You are viewing an older revision! See the latest version
DigitalOut
Mbed OS 2 and Mbed OS 5
This is the handbook for Mbed OS 2. If you’re working with Mbed OS 5, please see the new handbook. For the latest DigitalOut API, please see DigitalOut.
The DigitalOut interface is used to configure and control a digital output pin.
Hello World!¶
API¶
API summary
Import librarymbed
Interface¶
The DigitalOut Interface can be used on any pin with a blue label, and also with the on-board LEDs (LED1-LED4)
The DigitalOut Interface can be used to set the state of the output pin, and also read back the current output state. Set the DigitalOut to zero to turn it off, or 1 to turn it on.
![]() |
See the Pinout page for more details |