![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
DigitaIn Example
main.cpp
- Committer:
- fpucher
- Date:
- 2019-11-13
- Revision:
- 0:1b90d953ef92
- Child:
- 1:e92aff7a1cf0
File content as of revision 0:1b90d953ef92:
#define BUTTON1 p14 #include "mbed.h" // Flash an LED while a DigitalIn is true DigitalIn enable(BUTTON1); DigitalOut led(LED1); int main() { while(1) { if(enable) { led = !led; } wait(0.25); } }