Commit f48de9cf authored by Michal Rybka's avatar Michal Rybka
Browse files

Upload New File

parent e8f21ce9
/*
Test stromecku otestuje postupne všechny RGB LED.
*/
// initialize digital pin
const int LED1 = 0; // the number of the LED pin
const int LED2 = 1; // the number of the LED pin
const int LED3 = 9; // the number of the LED pin
const int LED4 = 4; // the number of the LED pin
const int LED5 = 10; // the number of the LED pin
const int LED6 = 5; // the number of the LED pin
const int LED7 = 11; // the number of the LED pin
const int LED9 = 6; // the number of the LED pin
const int LED10 = 12; // the number of the LED pin
const int LED11 = 13; // the number of the LED pin
const int BLUE = 17; // the number of the BLUE pin
const int GREEN = 18; // the number of the GREEN pin
const int RED = 19; // the number of the RED pin
// the setup function runs once when you press reset or power the board
void setup() {
pinMode(LED1, OUTPUT); // set OUTPUT
pinMode(LED2, OUTPUT); // set OUTPUT
pinMode(LED3, OUTPUT); // set OUTPUT
pinMode(LED4, OUTPUT); // set OUTPUT
pinMode(LED5, OUTPUT); // set OUTPUT
pinMode(LED6, OUTPUT); // set OUTPUT
pinMode(LED7, OUTPUT); // set OUTPUT
pinMode(LED9, OUTPUT); // set OUTPUT
pinMode(LED10, OUTPUT); // set OUTPUT
pinMode(LED11, OUTPUT); // set OUTPUT
pinMode(BLUE, OUTPUT); // set OUTPUT
pinMode(GREEN, OUTPUT); // set OUTPUT
pinMode(RED, OUTPUT); // set OUTPUT
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(RED, HIGH);
digitalWrite(GREEN, LOW);
digitalWrite(BLUE, LOW);
digitalWrite(LED1, LOW);
digitalWrite(LED2, LOW);
digitalWrite(LED3, LOW);
digitalWrite(LED4, LOW);
digitalWrite(LED5, LOW);
digitalWrite(LED6, LOW);
digitalWrite(LED7, LOW);
digitalWrite(LED9, LOW);
digitalWrite(LED10, LOW);
digitalWrite(LED11, LOW);
delay(5000);
digitalWrite(RED, LOW);
digitalWrite(GREEN, HIGH);
digitalWrite(BLUE, LOW);
digitalWrite(LED1, LOW);
digitalWrite(LED2, LOW);
digitalWrite(LED3, LOW);
digitalWrite(LED4, LOW);
digitalWrite(LED5, LOW);
digitalWrite(LED6, LOW);
digitalWrite(LED7, LOW);
digitalWrite(LED9, LOW);
digitalWrite(LED10, LOW);
digitalWrite(LED11, LOW);
delay(5000);
digitalWrite(RED, LOW);
digitalWrite(GREEN, LOW);
digitalWrite(BLUE, HIGH);
digitalWrite(LED1, LOW);
digitalWrite(LED2, LOW);
digitalWrite(LED3, LOW);
digitalWrite(LED4, LOW);
digitalWrite(LED5, LOW);
digitalWrite(LED6, LOW);
digitalWrite(LED7, LOW);
digitalWrite(LED9, LOW);
digitalWrite(LED10, LOW);
digitalWrite(LED11, LOW);
delay(5000);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment