Thanks for the code, but, I can't read it. Can you take out most (all) of those blank lines, and use the menu bar "tools-Auto Format"?
then upload it again. That made my 64 year old eyes start to hurt. LOL
I tried semi colon on void loop, Surfer Tim. It gave more error messages. I will paste the result from auto format even though I don't know what that is.These are my baby steps in Arduino. This sketch is from a book"30 Arduino projects for the Evil Genius by Simon Monk. Thanks for the replies.
Well, you have made enough changes that autoformat thinks it has worked now (no error from it), however it has failed completely because there are still errors in your program.
Things you will do before you post again:
Remove all the extra blank lines from your program so it is actually readable.
Manually reformat your code. Place every { on the line beneath the command it goes with, and indent lines up to its matching }
Look for any extraneous ; that have already been pointed out to you that you still haven't removed.
Your properly formatted code should look like this:
I very much doubt that the code in Simon Monk's book is the same as yours, so you have two choices: go back to the text and compare line by line with yours and correct it, or debug it. Debugging would stand you in better stead for working on programs of your own. I suggest that you compile your code and fix the first error it reports and repeat until it compiles cleanly. The first error is clear enough - if you get stuck after that, post your most recent code and/or go back to your book for help.
I doubt if Monk's book contains the same code you typed in. Remember:
Statements in C end with a semicolon. For example, char ch = Serial.read() without a semicolon isn't going to compile. There are others in your code, too.
Left and right braces are not the same. Use "{" at the start of a statement block and "}" at the end of that statement block.
Hi Everybody, I was wrong in the 1st post. It was my wrong copying the sketch from the book that gave the compiling error. When I went back and redid it there was no error. My apologies to all concerned.Thanks anyway.