DigitalInOut Hello World

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 DigitalInOut pin(p5);
00004  
00005 int main() {
00006     pin.output();
00007     pin = 0;     
00008     wait_us(500);
00009     pin.input();
00010     wait_us(500);
00011 }