sht21 nucleo 073

Dependencies:   SHT21_ncleee mbed

Files at this revision

API Documentation at this revision

Comitter:
asdjah
Date:
Tue Oct 30 07:55:14 2018 +0000
Commit message:
????????? ? ??????????? ????????

Changed in this revision

SHT21_ncleee.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r c65ff4c522cf SHT21_ncleee.lib
--- /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
diff -r 000000000000 -r c65ff4c522cf main.cpp
--- /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);
+         
+    }
+}
diff -r 000000000000 -r c65ff4c522cf mbed.bld
--- /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