Go Down

Topic: Trouble with cod  (Read 95 times) previous topic - next topic


I was wondering if any one could tell me what this means

Arduino: 1.8.12 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

NIGHTLIGHT:21:1: error: stray '\302' in program
   if (currentButton == HIGH)
NIGHTLIGHT:21:2: error: stray '\240' in program
   if (currentButton == HIGH)
exit status 1
stray '\302' in program


if (currentButton == HIGH)


it probably means you copied and pasted the sketch from a web page that did not format the sketch correctly.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.


Copy your code and paste it in the reply box on this forum.
Select the code in the reply box and copy it.
Paste it in your sketch overwriting all existing code.

Note: you don't have to post; you might have to go to the preview after step (1), can't remember anymore.

If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up