sht21 nucleo 073
Dependencies: SHT21_ncleee mbed
Revision 0:c65ff4c522cf, committed 2018-10-30
- Comitter:
- asdjah
- Date:
- Tue Oct 30 07:55:14 2018 +0000
- Commit message:
- ????????? ? ??????????? ????????
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SHT21_ncleee.lib Tue Oct 30 07:55:14 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/graeme88/code/SHT21_ncleee/#03bbabb7b0b0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 30 07:55:14 2018 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "SHT21_ncleee.h" + +DigitalOut led(LED2); +I2C i2c(I2C_SDA,I2C_SCL); +SHT21 sht(&i2c); + +int main() +{ + while(1) { + led = 1; // LED is ON + wait(0.2); // 200 ms + led = 0; // LED is OFF + wait(0.8); // 800 ms + + printf("Hello World...\n\tTesting temperature Sensor\n"); + int temperature = sht.readTemp(); + printf("Temperature is: %d \n", temperature); + printf("Experiment complete...\n"); + int humidity= sht.readHumidity(); + printf("Vlajnost: %d \n",humidity); + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 30 07:55:14 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187 \ No newline at end of file