DigitalInOut Hello World
Fork of DigitalInOut_HelloWorld_Mbed by
Use
The DigitalInOut API can be used to both read and write a digital pin. Use the output() and input() function calls to switch modes and then use just like you would DigitalIn or DigitalOut.
API
API reference.
Import librarymbed
main.cpp
- Committer:
- mbed_official
- Date:
- 2013-02-13
- Revision:
- 0:0d0417932681
- Child:
- 3:e4004b2e39ad
File content as of revision 0:0d0417932681:
#include "mbed.h" DigitalInOut pin(p5); int main() { pin.output(); pin = 0; wait_us(500); pin.input(); wait_us(500); }