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:
- 2:c0afe99e4314
- Parent:
- 1:17420a732fe8
- Child:
- 3:1d0d5b8471a3
--- a/main.cpp Tue Nov 21 15:33:44 2017 +0000
+++ b/main.cpp Tue Nov 21 15:43:14 2017 +0000
@@ -1,17 +1,17 @@
#include "mbed.h"
-#include "const.h"
-
+Serial pc(USBTX, USBRX);
DigitalOut myled(LED1);
-DigitalOut myled1(LED2);
+AnalogIn Ain(p20);
+
-int main()
-{
+int main() {
+ float ADCdata;
while(1) {
myled = 1;
- myled1 = 0;
- wait(TEMPO1);
+ wait(1);
myled = 0;
- myled = 1;
- wait(TEMPO2);
+ wait(1);
+ ACDdata=Ain.read();
+ pc.print("%f\t%fV \n\r", ADCdata, ABCdata*3.3);-
}
}