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.
Revision 0:8623c31b9888, committed 2017-03-13
- Comitter:
- dalleo
- Date:
- Mon Mar 13 16:14:18 2017 +0000
- Commit message:
- Suppression des led de debug et des option d'affichage ;
Changed in this revision
diff -r 000000000000 -r 8623c31b9888 DHT11.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DHT11.lib Mon Mar 13 16:14:18 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/s_inoue_mbed/code/DHT11/#e91c151d1798
diff -r 000000000000 -r 8623c31b9888 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Mar 13 16:14:18 2017 +0000
@@ -0,0 +1,27 @@
+/*
+ * A program for the use of the DHT11, a temperature and humidity sensor
+ * Shigenori Inoue, September 10, 2014
+ */
+
+#include "mbed.h"
+#include "DHT11.h"
+
+// Humidity sensor
+DHT11 d(D6);
+
+// The main function
+int main()
+{
+ int state;
+ while(true) {
+ state = d.readData();
+
+ if (state != DHT11::OK) {
+ printf("Error: %d", state);
+ } else {
+ printf("Temp=%d \n\rHumi=%d \n\r", d.readTemperature(), d.readHumidity());
+ }
+ wait(2.0);
+ }
+}
+
diff -r 000000000000 -r 8623c31b9888 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Mar 13 16:14:18 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/176b8275d35d \ No newline at end of file