int led_red = 6; // the red LED is connected to Pin 6 of the Arduino
int led_blue = 5; // the blue LED is connected to Pin 5 of the Arduino
int led_green = 3; // the green LED is connected to Pin 3 of the Arduino
void setup() {
// set up all the LEDs as OUTPUT
pinMode(led_red, OUTPUT);
pinMode(led_blue, OUTPUT);
pinMode(led_green, OUTPUT);
}
void loop() {
// turn the green LED on and the other LEDs off
digitalWrite(led_red, LOW);
digitalWrite(led_blue, LOW);
digitalWrite(led_green, HIGH);
delay(1000); // wait 1 seconds
// turn the blue LED on and the other LEDs off
digitalWrite(led_red, LOW);
digitalWrite(led_blue, HIGH);
digitalWrite(led_green, LOW);
delay(1000); // wait 1 second
// turn the red LED on and the other LEDs off
digitalWrite(led_red, HIGH);
digitalWrite(led_blue, LOW);
digitalWrite(led_green, LOW);
delay(1000); // wait 1 seconds
}
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.