Brand new to programming and following tutorial on YouTube. Everything works in my program as set up but am trying to put a for loop and it will not turn red. In fact none of the Control Structures will turn red. What is wrong?
int rdelon = 100;
int rdeloff = 100;
int rLEDPin = 9;
int ydelon = 100;
int ydeloff = 100;
int yLEDPin = 8;
void setup() {
pinMode(rLEDPin, OUTPUT); // put your setup code here, to run once:
pinMode(yLEDPin, OUTPUT);
}
void loop() {
for
digitalWrite(rLEDPin, HIGH); // put your main code here, to run repeatedly:
delay(rdelon);
digitalWrite(rLEDPin, LOW);
delay(rdeloff);
digitalWrite(yLEDPin, HIGH); // put your main code here, to run repeatedly:
delay(ydelon);
digitalWrite(yLEDPin, LOW);
delay(ydeloff);
}
Blackfin is correct. Different keyword types have different colors in the Arduino IDE (though the orange is the most common). That dark olive color is hard to distinguish from the black of standard text. Don't get too obsessed with keyword coloration in the Arduino IDE. It has no functional effect, only aesthetic. You will find that many libraries have missing keyword coloration because the author didn't bother to define their keywords in a keywords.txt file or inconsistent coloration because they did it wrong.
Thanks for pointing out that other thread lesept. It's true that you can change the keyword coloration to your preference.
Okay thanks I will try to finish the loop and see if it works. I did finish the loop before but it didn't seem to work. I will try again, maybe I had made a mistake.
LOL.. Thought is was the LED's not lighting up as expected.. You screen, or its calibration, may not be good at reproducing the colors used in the IDE..