Any text beginning with // is ignored by Arduino. These lines are comments, which are notes that you leave in the program for yourself, so that you can remember what you did when you wrote it, or for somebody else, so they can understand your code.
It is very common (we know this because we do it all the time) to write a piece of code, upload it onto the board, and say “OK—I’m never going to have to touch this sucker again!” only to realise six months later that you need to update the code or fix a bug. At this point, you open up the program, and if you haven’t included any comments in the original program, you’ll think, “Wow—what a mess! Where do I start?” As we move along, you’ll see some tricks for how to make your programs more readable and easier to maintain.
Leave a Reply