A simple example demonstrating use of the mbed-read.vi component

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut myled(LED1);
00004 AnalogIn x(p20);
00005 
00006 int main() {
00007     while (1) {
00008         printf("%f\n", x.read());
00009         myled = !myled;
00010         wait(0.01);
00011     }
00012 }