Found objects and diy switches

Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno"

code_hacking_-Found_Objects_and_DIY_Switches_Emily_Honderich:2:1: error: expected unqualified-id before numeric constant
1 /*
^
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:33:1: error: expected unqualified-id before numeric constant
32 int ledPins[] = {
^~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:37:1: error: expected unqualified-id before numeric constant
36 int pinCount = 6; // the number of pins (i.e. the length of the array)
^~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:38:1: error: expected unqualified-id before numeric constant
38
^~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:44:29: error: 'thisPin' does not name a type
44 for (int thisPin = 0; thisPin < pinCount; thisPin++) {
^~~~~~~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:44:49: error: 'thisPin' does not name a type
44 for (int thisPin = 0; thisPin < pinCount; thisPin++) {
^~~~~~~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:49:1: error: expected unqualified-id before numeric constant
49
^~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:55:29: error: 'thisPin' does not name a type
55 for (int thisPin = 0; thisPin < pinCount; thisPin++) {
^~~~~~~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:55:49: error: 'thisPin' does not name a type
55 for (int thisPin = 0; thisPin < pinCount; thisPin++) {
^~~~~~~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:68:1: error: expected unqualified-id before numeric constant
68 Array
^~
code_hacking
-Found_Objects_and_DIY_Switches_Emily_Honderich:71:40: error: 'thisPin' does not name a type
71 for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) {
^~~~~~~
code_hacking
-_Found_Objects_and_DIY_Switches_Emily_Honderich:71:54: error: 'thisPin' does not name a type
71 for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) {
^~~~~~~
exit status 1
expected unqualified-id before numeric constant

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE

Looks like you have copied and pasted code which has line numbers. Delete them.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.