sytax For

int led=13;
int ledOn=1000;
int ledOff=1000;

void setup() {
pinMode(led,OUTPUT);
}
void loop() {

for(j=0;j=<10;j=j+1;) {

digitalWrite(led,HIGH); // Turn on Led
delay(ledOn);j
digitalWrite(led,LOW); // turn off the led
delay(ledOff);
}
}

For is not turning orange when I type it, how do I get it to turn orange?

thanks

Colin

Who cares what color it is?

It's not intended to be orange. Actually if you look closely it is colored a dark olive, rather than the black of standard text.

sladecolin:
For is not turning orange when I type it, how do I get it to turn orange?

If the program works what does it matter what colour it is?

...R

Before you worry about the colour of 'for' you should fix the four error messages that the compiler generates for that one statement.

Pete

Thanks found my errors

You can also change the colors associated with keywords, variables, etc. if you wish. I do this because I have difficulty seeing certain colors. Go to your installation directory for the Arduino IDE, then look on the path:

lib\theme

and look for the file named theme.txt. Make a copy of this file and call it themeOriginal.txt so you can backtrack if you need to. Then open theme.txt with your favorite text editor and experiment with the RGB values you see defined there. I find using a color wheel makes it easier to experiment with different colors. You need to reload the IDE after each change for them to take affect.

sladecolin:
Thanks found my errors

A semicolon too far?

With apologies to Cornelius Ryan. :slight_smile:

A semicolon too far?

  • you haven't declared variable j.
for(byte j = 0;j <10;j++) {