/* Toggling LED0 and LED1 on EduBase V2 * There are four LEDs on the EduBase V2 board * They are LED0, LED1,LED2 and LED3. * The LED0 is on the most right. * * LED0 is connected to the pin 2. * LED1 is connected to the pin 3. */ const int LED0 = 2; /* LED0 connecterd to pin 2 */ const int LED1 = 3; /* LED1 connecterd to pin 3 */ const int mydelay = 500; /* delay size */ void setup() { pinMode(LED0, OUTPUT); /* set LED0 pin as output */ pinMode(LED1, OUTPUT); /* set LED1 pin as output */ } void loop() { digitalWrite(LED0,HIGH); /* turn on the LED0 */ digitalWrite(LED1,HIGH); /* turn on the LED0 */ delay(mydelay); /* delay */ digitalWrite(LED0,LOW); /* turn off the LED0 */ digitalWrite(LED1,LOW); /* turn off the LED1 */ delay(mydelay); /* delay */ }