RGB LED chika chika

Dependencies:   mbed

Fork of mbed_LED_chika by shinichi satoh

Committer:
thursday1024
Date:
Wed Jul 15 11:23:20 2015 +0000
Revision:
8:c87c95d37988
Parent:
4:81cea7a352b0
Child:
9:5ba1eff3500b
LED chika chika

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan 0:7dec7e9ac085 1 #include "mbed.h"
dan 0:7dec7e9ac085 2
thursday1024 8:c87c95d37988 3 DigitalOut myled1(LED1);
thursday1024 8:c87c95d37988 4 DigitalOut myled2(LED2);
thursday1024 8:c87c95d37988 5 DigitalOut myled3(LED3);
thursday1024 8:c87c95d37988 6 DigitalIn mysw1(PTA4);
thursday1024 8:c87c95d37988 7 DigitalIn mysw2(PTC6);
dan 0:7dec7e9ac085 8
dan 0:7dec7e9ac085 9 int main() {
thursday1024 8:c87c95d37988 10 int i=0;
dan 0:7dec7e9ac085 11 while(1) {
thursday1024 8:c87c95d37988 12 myled1 = mysw1;
thursday1024 8:c87c95d37988 13 myled2 = mysw2;
thursday1024 8:c87c95d37988 14 myled3 = 1;
thursday1024 8:c87c95d37988 15 wait(0.9);
thursday1024 8:c87c95d37988 16 myled1 = 0;//(i>>2)&1;
thursday1024 8:c87c95d37988 17 myled2 = 0;//(i>>1)&1;
thursday1024 8:c87c95d37988 18 myled3 = 0;//(i)&1;
thursday1024 8:c87c95d37988 19 wait(0.1);
thursday1024 8:c87c95d37988 20 i++;
stevep 4:81cea7a352b0 21 }
dan 0:7dec7e9ac085 22 }