int BUILTIN_LED = 13;
int yPin = 6;
int rPin = 9;
int gPin = 3;
void setup() {
// put your setup code here, to run once:
pinMode(BUILTIN_LED, OUTPUT);
pinMode(yPin, OUTPUT);
pinMode(rPin, OUTPUT);
pinMode(gPin, OUTPUT);
pinMode(xPin, OUTPUT);
digitalWrite(BUILTIN_LED, LOW);
}
void loop() {
// put your main code here, to run repeatedly:
// delay(5);
digitalWrite(yPin, HIGH);
delay(2000);
digitalWrite(yPin, LOW);
digitalWrite(rPin, HIGH);
delay(2000);
digitalWrite(rPin, LOW);
digitalWrite(gPin, HIGH);
delay(2000);
digitalWrite(gPin, LOW);
}
xfpd
4
Your program does not compile, again. Take your time to make sure it works before posting. AND... listen to the advice to format your code.
int BUILTIN_LED = 13;
int yPin = 6;
int rPin = 9;
int gPin = 3;
void setup() {
// put your setup code here, to run once:
pinMode(BUILTIN_LED, OUTPUT);
pinMode(yPin, OUTPUT);
pinMode(rPin, OUTPUT);
pinMode(gPin, OUTPUT);
// pinMode(xPin, OUTPUT); // what is this?
digitalWrite(BUILTIN_LED, LOW);
}
void loop() {
// put your main code here, to run repeatedly:
// delay(5);
digitalWrite(yPin, HIGH);
delay(2000);
digitalWrite(yPin, LOW);
digitalWrite(rPin, HIGH);
delay(2000);
digitalWrite(rPin, LOW);
digitalWrite(gPin, HIGH);
delay(2000);
digitalWrite(gPin, LOW);
}
Hi, @polis_12
Welcome to the forum.
What is the problem?
What model Arduino are you using?
Thanks.. Tom..

jim-p
7
In the IDE on the Menu bar, click on Edit then Copy for Forum, then paste you code here so we can see it.