![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
跑马灯4个
Fork of HelloWorld by
main.cpp
- Committer:
- denghua1984726
- Date:
- 2014-04-25
- Revision:
- 2:1c5bfc3e0331
- Parent:
- 0:fb6bbc10ffa0
File content as of revision 2:1c5bfc3e0331:
#include "mbed.h" DigitalOut myled1(LED1); DigitalOut myled2(LED2); DigitalOut myled3(LED3); DigitalOut myled4(LED4); int main() { myled1 = 0; myled2 = 0; myled3 = 0; myled4 = 0; while(1) { myled4 = 0; myled1 = 1; wait(0.5); myled1 = 0; myled2 = 1; wait(0.5); myled2 = 0; myled3 = 1; wait(0.5); myled3 = 0; myled4 = 1; wait(0.5); } }