forked from https://developer.mbed.org/users/hardtail/code/MATSU-bed_blinky/
Fork of MATSU-bed_blinky by
main.cpp
- Committer:
- hardtail
- Date:
- 2016-04-14
- Revision:
- 1:68364bcdd696
- Parent:
- 0:d696cd1aea56
- Child:
- 2:f94af4a543bd
File content as of revision 1:68364bcdd696:
#include "mbed.h" #include "USBSerial.h" #define LED1 P0_29 #define LED2 P0_28 #define LED3 P0_27 #define LED4 P0_26 #define ISP0 P0_4 #define ISP1 P0_16 //USBSerial pc; BusOut myled(LED1, LED2, LED3, LED4); //DigitalIn sw1(ISP0); //DigitalIn sw2(ISP1); int main() { //sw1.mode(PullUp); myled = 1; while(1){ if(myled < 0b1000){ myled = myled << 1; }else{ myled = myled >> 1; } wait(0.5); } }