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:909e35b48b7d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jul 04 03:24:53 2013 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "Serial.h" + +AnalogIn ain01(p19); +DigitalIn sw01(p20); +Serial usbSerial(USBTX, USBRX); + +int main() { + + sw01.mode(PullUp); + int i = 0; + while(1) { + int sw = sw01; + float analog = ain01; + usbSerial.printf("%d, %f\r\n", sw, analog); + wait(0.01); + } +} \ No newline at end of file