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.
Dependencies: mbed OneWire DHT22 TSL2561 SSD1306
Diff: main.cpp
- Revision:
- 1:1b64ee29ae15
- Parent:
- 0:75cfe7e78e4b
- Child:
- 2:1e52e7fab454
diff -r 75cfe7e78e4b -r 1b64ee29ae15 main.cpp
--- a/main.cpp Mon Sep 11 13:50:21 2017 +0000
+++ b/main.cpp Mon Sep 11 15:31:09 2017 +0000
@@ -1,6 +1,8 @@
#include "mbed.h"
-DigitalOut myled(LED1);
+DigitalOut myled(PB_3);
+AnalogIn Hum(PA_0); //Entrée du capteur
+Serial pc(PA_2,PA_3); //Tx,Rx
int main() {
while(1) {
@@ -8,5 +10,7 @@
wait(1.0); // 200 ms
myled = 0; // LED is OFF
wait(1.0); // 1 sec
+
+ pc.printf("%f",Hum.read()); //Lit l'entrée du capteur et l'affiche
}
}
