"Error compiling for board Arduino Uno"

Hi.
I am totally new to electronics, Arduino & coding. I have been following tutorials on the web, getting to grips with the whole concept. All was going well until yesterday, when coding for a RGB LED and serial input. It looks like id completed the code correctly, but when trying to upload, I received the error as shown in the subject line above, coupled with 'exit status 1" in the dialogue box at the bottom.
I have tried to troubleshoot the matter on line, but they don't seem to answer the particular question.
Any help, gratefully received.

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link that will allow you to make the attachment.

Arduino: 1.8.14 Hourly Build 2021/01/29 11:34 (Mac OS X), Board: "Arduino Uno"











In file included from sketch/sketch_jan29d.ino.cpp:1:0:
/Users/alanpridgeon/Documents/Arduino/sketch_jan29d/sketch_jan29d.ino: In function 'void loop()':
/private/var/folders/6c/qzxbdqy93mv90zphm8r6bygr0000gn/T/AppTranslocation/FD6378B8-1C37-41B0-B1AB-DFB61BA6595D/d/Arduino-2.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:41:14: error: expected unqualified-id before numeric constant
 #define LOW  0x0
              ^
/Users/alanpridgeon/Documents/Arduino/sketch_jan29d/sketch_jan29d.ino:28:24: note: in expansion of macro 'LOW'
   digitalWrite(bluePin.LOW);
                        ^~~
/private/var/folders/6c/qzxbdqy93mv90zphm8r6bygr0000gn/T/AppTranslocation/FD6378B8-1C37-41B0-B1AB-DFB61BA6595D/d/Arduino-2.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:41:14: error: expected unqualified-id before numeric constant
 #define LOW  0x0
              ^
/Users/alanpridgeon/Documents/Arduino/sketch_jan29d/sketch_jan29d.ino:34:24: note: in expansion of macro 'LOW'
   digitalWrite(bluePin.LOW);
                        ^~~
/private/var/folders/6c/qzxbdqy93mv90zphm8r6bygr0000gn/T/AppTranslocation/FD6378B8-1C37-41B0-B1AB-DFB61BA6595D/d/Arduino-2.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:40:14: error: expected unqualified-id before numeric constant
 #define HIGH 0x1
              ^
/Users/alanpridgeon/Documents/Arduino/sketch_jan29d/sketch_jan29d.ino:40:24: note: in expansion of macro 'HIGH'
   digitalWrite(bluePin.HIGH);
                        ^~~~
/private/var/folders/6c/qzxbdqy93mv90zphm8r6bygr0000gn/T/AppTranslocation/FD6378B8-1C37-41B0-B1AB-DFB61BA6595D/d/Arduino-2.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:41:14: error: expected unqualified-id before numeric constant
 #define LOW  0x0
              ^
/Users/alanpridgeon/Documents/Arduino/sketch_jan29d/sketch_jan29d.ino:45:24: note: in expansion of macro 'LOW'
   digitalWrite(bluePin.LOW);
                        ^~~
exit status 1
Error compiling for board Arduino Uno.


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

As requested.

apridgeon:

   digitalWrite(bluePin.LOW);

Please study the reference page for digitalWrite() and the Blink tutorial to understand how to use this function correctly:

Hi pert

Doh! Thanks!

So sorry to waste your time. I hadn't looked at that; I presumed, when using the verify button that the Arduino would have picked up the "." rather than the ",".

Thanks again; as I said Im totally new to this subject and learning the language comes slow to someone of my age!

Thanks.

apridgeon:
So sorry to waste your time.

No need to be sorry. I'm just glad if I can be of assistance. Enjoy!
Per

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