MATSU-bedのLチカ用サンプルプログラム
Dependencies: mbed MATSUbed USBDevice
Fork of MATSU-bed_blinky by
Wiki https://developer.mbed.org/teams/MATSU-bed/wiki/MATSU-bed-config
Diff: main.cpp
- Revision:
- 0:d696cd1aea56
- Child:
- 1:68364bcdd696
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Apr 14 06:43:17 2016 +0000 @@ -0,0 +1,32 @@ +#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; + +DigitalOut 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); + } +} \ No newline at end of file