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:
- 1:67a2c4f35f98
- Parent:
- 0:4066e82f0e4c
- Child:
- 2:9d7bbe39008b
diff -r 4066e82f0e4c -r 67a2c4f35f98 main.cpp
--- a/main.cpp Tue Feb 26 08:28:44 2019 +0000
+++ b/main.cpp Tue Feb 26 09:29:37 2019 +0000
@@ -5,17 +5,18 @@
// 9600 bauds, 8-bit data, no parity
//------------------------------------
+AnalogIn capteur(A1);
Serial pc(SERIAL_TX, SERIAL_RX);
+DigitalOut myled(LED1);
-DigitalOut myled(LED1);
int main()
{
- int i = 1;
- pc.printf("Hello World !\n");
- while(1) {
- wait(1);
- pc.printf("This program runs since %d seconds.\n", i++);
- myled = !myled;
+ while(1)
+ {
+ wait(1);
+ pc.printf("Ucap = %.2f mV\n\r", capteur);
+ wait(1);
+
}
-}
+}
\ No newline at end of file