Tedd OKANO
/
_sample_self_reset
main.cpp
- Committer:
- okano
- Date:
- 2011-03-30
- Revision:
- 0:57ee3dae2e7f
File content as of revision 0:57ee3dae2e7f:
#include "mbed.h" BusOut led( LED1, LED2, LED3, LED4 ); DigitalInOut io( p5 ); int main() { io.mode( PullUp ); io.input(); io = 0; char count = 4; led = 0xF; wait( 0.25 ); led = 0x0; wait( 0.25 ); led = 0xF; wait( 0.25 ); led = 0x0; wait( 0.25 ); while (1) { led = 0xF0 >> count; if ( !count-- ) io.output(); wait( 1 ); } }