You are viewing an older revision! See the latest version
DigitalInOut
The DigitalInOut interface is used as a bi-directional digital pin, used to read the value of a digital pin when set as an input, or write the value when set as an output.
Any of the numbered mbed pins can be used as a DigitalInOut.
Hello World!¶
Reset a 1-Wire device
#include "mbed.h" DigitalInOut pin(p5); int main() { pin.output(); pin = 0; wait_us(500); pin.input(); wait_us(500); }
API¶
API summary