sht21 nucleo 073
Dependencies: SHT21_ncleee mbed
main.cpp
- Committer:
- asdjah
- Date:
- 2018-10-30
- Revision:
- 0:c65ff4c522cf
File content as of revision 0:c65ff4c522cf:
#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); } }