DigitalInOut Hello World

Dependencies:   mbed

mbed 2 and mbed OS 5

This is an mbed 2 example. For an mbed-os example, please see:

Import programDigitalInOut_HelloWorld

DigitalInOut Hello World

Committer:
mbed_official
Date:
Thu Feb 21 17:06:42 2013 +0000
Revision:
1:7cee0b019b98
Parent:
0:0d0417932681
use latest version of mbed libraries

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:0d0417932681 1 #include "mbed.h"
mbed_official 0:0d0417932681 2
mbed_official 0:0d0417932681 3 DigitalInOut pin(p5);
mbed_official 0:0d0417932681 4
mbed_official 0:0d0417932681 5 int main() {
mbed_official 0:0d0417932681 6 pin.output();
mbed_official 0:0d0417932681 7 pin = 0;
mbed_official 0:0d0417932681 8 wait_us(500);
mbed_official 0:0d0417932681 9 pin.input();
mbed_official 0:0d0417932681 10 wait_us(500);
mbed_official 0:0d0417932681 11 }