/* 4 Rotating Led without PWM
by Zafer SAHIN
License of this example code is TEA-WARE.
modified 12/01/2015 by Zafer SAHIN
version 0.2
* ----------------------------------------------------------------------------
* "THE TEA-WARE LICENSE" (Revision 01):
* Zafer SAHIN wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can treat me a tea in return. Zafer SAHIN
* ----------------------------------------------------------------------------
*/
int beaconLed[] = {3,9,10,11}; // Pin numbers to attach the leds :
void setup() {
pinMode(beaconLed[0], OUTPUT);
pinMode(beaconLed[1], OUTPUT);
pinMode(beaconLed[2], OUTPUT);
pinMode(beaconLed[3], OUTPUT);
}
void loop() {
// STEP1
digitalWrite(beaconLed[0], HIGH);
digitalWrite(beaconLed[1], LOW);
digitalWrite(beaconLed[2], LOW);
digitalWrite(beaconLed[3], LOW);
// Wait 100 milliseconds in every rotating position
delay(100);
// STEP2
digitalWrite(beaconLed[0], LOW);
digitalWrite(beaconLed[1], HIGH);
digitalWrite(beaconLed[2], LOW);
digitalWrite(beaconLed[3], LOW);
// Wait 100 milliseconds in every rotating position
delay(100);
// STEP3
digitalWrite(beaconLed[0], LOW);
digitalWrite(beaconLed[1], LOW);
digitalWrite(beaconLed[2], HIGH);
digitalWrite(beaconLed[3], LOW);
// Wait 100 milliseconds in every rotating position
delay(100);
// STEP4
digitalWrite(beaconLed[0], LOW);
digitalWrite(beaconLed[1], LOW);
digitalWrite(beaconLed[2], LOW);
digitalWrite(beaconLed[3], HIGH);
// Wait 100 milliseconds in every rotating position
delay(100);
}