Please use a screen grab, photos of screens is not usable. Also go into the IDE preferences and crank the compiler warnings to ALL.
BTW, how many years coding experience do you have, hobby or job?
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@zander Unfortunately my programming experience is less than a week. I've mostly been taking courses and doing a few basic sketches. I made the changes you requested and here is the screen grab you requested.
@tckellogg missing { after loop()
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
Your problem (this time) is that you are not using the brace brackets to properly contain the code associated with the subroutines.
In particular, this error derives from your code which is effectively ...
void loop() .... code body ...
whereas the code body for the loop sub must be placed inside brace brackets as ...
void loop() {.... code body ...}
In this case the compiler sees a bunch of code ranging around loose and so it cannot compile it properly.
You have created the setup code correctly, use the same form for loop and you'll be past this problem
Experience is what you get when you don't get what you want.
@will Thanks for the help. That fixed it. I can't take credit for the sketch. I was just copying and pasting
@tckellogg You are welcome. Here is a hint, use select all (cmd-a apple or ctrl-a win) on the original sketch so the copy paste doesn't miss any parts.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting