Lab02 example: drive LED1 by a pushbutton tied between D3 and GND Platform: FRDM-KL25z
Dependencies: mbed
Fork of led_button by
main.cpp
- Committer:
- icserny
- Date:
- 2015-10-12
- Revision:
- 1:0df6e12ac40d
- Parent:
- 0:b5f81eb006d4
File content as of revision 1:0df6e12ac40d:
/* led_button - digital I/O example * drive LED1 by a pushbutton tied between D3 and GND * Platform: FRDM-KL25Z */ #include "mbed.h" DigitalIn mybutton(D3,PullUp); DigitalOut myled(LED_RED); int main() { while (true) { myled = mybutton; wait_ms(20); } }