Skip to content Skip to sidebar Skip to footer

How to fix Stray 302 in program On Arduino

Arduino Stray 302 In Program

How to fix Stray 302 in program On ArduinoThis time I want to share about an error that I do not usually experience. When I'm making a program in the arduino IDE.

Then the program I created, I compile to get the results, but there is an error. The error shown here is unusual, I've never had an error like this.

The error message is stray 302 in program. Look at the picture below.

How to fix Stray 302 in program On Arduino

After searching from various references, the error stray 302 in this program occurred because we copied and pasted the text from another data processor into our Arduino IDE. 

Sure enough, I took the text from google translate and then I pasted it into the Arduino IDE. The reason is, when I paste, the ASCII code goes into the arduino IDE. 

Some of the code that causes errors is usually spaces & quotes (" ").


How to fix it?

1. For Space

Remove the spaces at the beginning and end of the error line, then in the Arduino IDE, select the Tools  > Auto Format. Here my problem is solved. If there are still errors that appear, check again that the spaces that may be in the middle of the sentence have not been removed.

2. For Quotes

Replace the quotes from the copy and paste from a website like “  ” to " ".

Tips:

If you want to replace the entire error text, you can use the "Find and Replace" feature by pressing CTRL + F on the Arduino IDE, then enter the word you want to replace in the "Find" form and enter a new word that will replace the wrong word. on the "Replace with" form, then click the "Replace All" button.

Hopefully this article is useful.

Post a Comment for "How to fix Stray 302 in program On Arduino"