What is a "stray '\302' ?

I have the sketches MasterSwapRoles and SlaveSwapRoles downloaded from http://forum.arduino.cc/index.php?topic=421081.0

In both cases, attempted compilation raises

Compiling sketch...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-ID:\Documents\Arduino\libraries\RF24" "C:\Users\Rick\AppData\Local\Temp\arduino_build_124292\sketch\SlaveSwapRoles.ino.cpp" -o "C:\Users\Rick\AppData\Local\Temp\arduino_build_124292\sketch\SlaveSwapRoles.ino.cpp.o"
SlaveSwapRoles:16: error: stray '\302' in program

 RF24 radio(CE_PIN, CSN_PIN); // Create a Radio


What is a "stray '\302' "? How do I get the code to compile?

Note: I am using Arduino 1.6.12, RF24 (TMRh20) v1.1.7, and Firmata v2.5.4.

It compiled OK for me. Try pressing the "Select" link above the code and then copy and paste. You might have brought in an unintended extra character.

Nope! Here is the compiler printout for MasterSwapRoles cut and pasted into NotePad because it’s too long to insert in this post.

MasterSwapRoles.txt (30.2 KB)

It means a weird character that you can't see is inserted in the code somewhere - usually for me they are close to {} or []

Do you have an alternate text editor that shows invisible characters? If so open your code there, and look for the culprit where the compiler complained.

Alternatively re-enter manually (no copy paste as you would take the invisible character along) that full line manually and delete the other one where compiler complains

I have tried WordPad, NotePad, GPS (Ada IDE), DevC (C++ IDE) and Word with Display --> Hidden Text set. None of them show hidden characters.

I have even tried going to the places the compiler identifies and backspacing back to the next line to clear any rubbish, then ENTERing forward a bit. Error still appears.

If someone has this code and it compiles okay, would you mind attaching it to a post so I can get at it. Thanks.

BHTW: I have just 'upgraded' to Arduino 1.6.12. Could this be some new spell cast on the editor?

Here they are. Both compile fine for me with Arduino IDE 1.6.12.

MasterSwapRoles.ino (1.99 KB)

SlaveSwapRoles.ino (1.94 KB)

Thanks pert

Now the [u]BIG[/u] question: "How do I get them working together?"

They both compile, they both upload to the UNOs, they both Serial print some output. They don't appear to communicate.