User manual
Ausgabe 19.05.2017 Copyright by Joy-IT 19
int redled =10; // initialises digital PIN 8
int yellowled =7; // initialises digital PIN 7
int greenled =4; // initialises digital PIN 4
void setup()
{
pinMode(redled, OUTPUT); // sets red LED PIN to output
pinMode(yellowled, OUTPUT); // sets yellow LED PIN to output
pinMode(greenled, OUTPUT); // sets green LED PIN to output
}
void loop()
{
digitalWrite(greenled, HIGH); // turns on green LED
delay(5000); // waits 5 seconds
digitalWrite(greenled, LOW); // turns off green LED
for(int i=0;i<3;i++) // flashes 3x
{
delay(5000); // waits 5 seconds
digitalWrite(yellowled, HIGH); // turns on yellow LED
delay(5000); // waits 5 seconds
digitalWrite(yellowled, LOW); // turns off yellow LED
}
delay(5000); // waits 5 seconds
digitalWrite(redled, HIGH); // turns on red LED
delay(5000); // waits 5 seconds
digitalWrite(redled, LOW); // turns off red LED
}
You can watch the trac lights, aer the transfer is complete.
The green light is going to light up for ve seconds.
The yellow light then ashes three mes.
The green light will then light up for another ve seconds.
Then the yellow light wll ash three mes again.
In the end the red light will light up for three seconds and completes the cycle.