Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:dc00eac8d44a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Jun 06 14:09:04 2017 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "lib_SHT11.h"
+
+SHT11 capteur_HT;
+//SHT11 capteur_HT(p30, p29, 2.0); //data, sck, periode_cycle_mesure
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+ float Temperature_mesuree=0.0, Humidite_mesuree=0.0;
+
+ while(1)
+ {
+ if((Temperature_mesuree != capteur_HT.lire_T()) || (Humidite_mesuree != capteur_HT.lire_H()))
+ {
+ capteur_HT.lire_T_H(&Temperature_mesuree, &Humidite_mesuree);
+ pc.printf("T=%f\tH=%f\r\n", Temperature_mesuree, Humidite_mesuree);
+ }
+ }
+}
\ No newline at end of file