Why do some commands appear in another color

In the Arduino compiler dialog page.......why ...for instance in the sketch example "fade".... is the word analogwrite in a different color than (led, brightness)?

Pinmode is also a different color.... thanks, D.

Read about keywords.txt here: http://arduino.cc/en/Hacking/LibraryTutorial

It is a service to the user, so he can instantly recognize Arduino C keywords. These words must never be used as variable or function (subroutine) names.

If you try key in such a word, it will instanrly turn into another colour as a warning. There are exeptions to this rule, for instance in a print command, the text to print appears lightblue.

Thanks....I've tried writing my own Blink program.... It wont compile... You'd think I could do it ....it's already in the examples....but no. Could someone please tell me...by the way... what ......are these for { }....ie ...when do you use them... I cant find out in my reading and searching... This is very frustrating..... going back and forth....with the forum.... I'm not complaining because I really need the help... but how does anyone learn to do this without a proper classrooms setting....? just seems very daunting right now... D.

Another question, please. Is there some kind of a debugger for this Arduino compiler page? There appears a little box around some of my parenthesis sometimes... what does that mean? thanks..

The box shows the matching parentheses. For debugging, use Serial prints, turn on LEDs or SPI/I2C to another device. See tip #9 here: http://www.gammon.com.au/power

Maybe a book like this will help you along: http://www.amazon.ca/Arduino-Cookbook-Michael-Margolis/dp/1449313876

except for the book...I dont have any idea what you're talking about. You honestly think I understand "serial prints"....or sp1/12c....? appreciate the thought, though. d.

dthx: except for the book...I dont have any idea what you're talking about. You honestly think I understand "serial prints"....or sp1/12c....? appreciate the thought, though. d.

Ever hear of a thing called google? It's really handy when you see a word you don't know.

As I understand you, you are asking about debugging. With just the Arduino IDE, you are limited in debugging capability.

To find problems in your code/sketch, you can use the Serial.print() function to send debug information (example, variable values) to the built in IDE serial monitor. You place your debug prints at strategic locations in your code to prove you are indeed getting the things you think you are getting.

You can turn on a LED at strategic locations to prove sections of your code are being run.

SPI and I2C are more advanced ways/techniques similar to Serial.print that can also be useful to track down problems.

Once your code is running smoothly you can disable or remove the debug code you added.

These concepts are simple but with experience you will find they are adequate for finding your problems.

How about showing us your progress in your sketch(es) so we can point you in the right direction and possibly pass on some programming hints and ideas.

You will only succeed in programming the Arduino by: reading, following examples, writing code, connecting the hardware circuits and making and learning from your mistakes.

When you run into a problem, give us the pertinent information about your project and ask in the forums for help.

Have you found the Reference page yet? It links you to all the commands, like Serial.print(). It's also at Help > Reference in the IDE.

The idea with Serial.print() or Serial.println() in debugging, is to show stuff on the monitor so you can see what's going on. Let's say you're not sure if a variable is updating as you hoped.... print it to the screen and you'll see what its current value is. Or you might have a complicated if...else if... thing and you're not sure that your logic's correct so you're not sure if the program's taking the right path.

Then in each "leg" of the if, you do a Serial.println("I'm in the such-and-such leg now"); so you can follow the logic.

To use Serial.print you first need to put Serial.begin(9600); inside setup(). You open the serial monitor in the IDE by going Tools > Serial Monitor, or Control/Shift/M or hit the icon top right that looks like a maginifying glass.