Led blinking in the other way: Blink the green LED by switching the LED_GREEN (PTB19) pin between output and input mode. In output mode the pin will sink, while in the input mode it will be in the tristate (high impedance) mode. Platform: RDM-KL25Z board
Dependencies: mbed
main.cpp
- Committer:
- icserny
- Date:
- 2015-10-12
- Revision:
- 0:4e110b1c53fc
File content as of revision 0:4e110b1c53fc:
/** Ledblink the other way * Blink the green LED by switching the LED_GREEN (PTB19) pin * between output and input mode. In output mode the pin will sink, * while in the input mode it will be in the tristate (high impedance) mode. * * Platform: RDM-KL25Z board */ #include "mbed.h" DigitalInOut myled(LED_GREEN); int main() { while(1) { myled.output(); myled = 0; wait(0.2); myled.input(); wait(0.2); } }