Hi, i opened a previously used (and verified) code to the IDE, and now i am getting weird error messages, such as:
sketch_feb17b.ino:25:6: error: stray '\' in program
sketch_feb17b.ino:25:6: error: stray '\' in program
sketch_feb17b.ino:28:10: error: stray '\' in program
sketch_feb17b.ino:28:10: error: stray '\' in program
sketch_feb17b.ino:31:7: error: stray '\' in program
sketch_feb17b.ino:31:7: error: stray '\' in program
sketch_feb17b.ino:34:10: error: stray '\' in program
sketch_feb17b.ino:34:10: error: stray '\' in program
sketch_feb17b.ino:37:7: error: stray '\' in program
sketch_feb17b.ino:37:7: error: stray '\' in program
sketch_feb17b.ino:40:10: error: stray '\' in program
sketch_feb17b.ino:40:10: error: stray '\' in program
sketch_feb17b.ino:43:7: error: stray '\' in program
sketch_feb17b.ino:43:7: error: stray '\' in program
sketch_feb17b.ino:46:10: error: stray '\' in program
sketch_feb17b.ino:46:10: error: stray '\' in program
sketch_feb17b.ino:49:7: error: stray '\' in program
sketch_feb17b.ino:49:7: error: stray '\' in program
sketch_feb17b.ino:55:10: error: stray '\' in program
sketch_feb17b.ino:55:10: error: stray '\' in program
sketch_feb17b.ino:55:10: error: stray '\' in program
sketch_feb17b.ino: In function 'void loop()':
sketch_feb17b.ino:25:25: error: 'u20191' was not declared in this scope
sketch_feb17b.ino:25:32: error: expected ')' before 'u2032'
sketch_feb17b.ino:28:29: error: 'u201cGREEN' was not declared in this scope
sketch_feb17b.ino:31:26: error: 'u20192' was not declared in this scope
sketch_feb17b.ino:31:33: error: expected ')' before 'u2032'
sketch_feb17b.ino:34:29: error: 'u201cBLUE' was not declared in this scope
sketch_feb17b.ino:37:26: error: 'u20193' was not declared in this scope
sketch_feb17b.ino:37:33: error: expected ')' before 'u2032'
sketch_feb17b.ino:40:29: error: 'u201cRED' was not declared in this scope
sketch_feb17b.ino:43:26: error: 'u20194' was not declared in this scope
sketch_feb17b.ino:43:33: error: expected ')' before 'u2032'
sketch_feb17b.ino:46:29: error: 'u201cWHITE' was not declared in this scope
sketch_feb17b.ino:49:27: error: 'u20190' was not declared in this scope
sketch_feb17b.ino:49:34: error: expected ')' before 'u2032'
sketch_feb17b.ino:55:29: error: 'u201cLED' was not declared in this scope
Error compiling.
And the actual code:
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(10, 11); // RX, TX
int ledGRN = 4;
int ledBLU = 5;
int ledRED = 6;
int ledWHI = 7;
int BluetoothData;
void setup()
{
bluetooth.begin(9600);
pinMode(ledGRN,OUTPUT);
pinMode(ledBLU,OUTPUT);
pinMode(ledRED,OUTPUT);
pinMode(ledWHI,OUTPUT);
}
void loop()
{
if (bluetooth.available())
{
BluetoothData=bluetooth.read();
if(BluetoothData==’1′)
{
digitalWrite(ledGRN,1);
bluetooth.println(“GREEN ON”);
}
if(BluetoothData==’2′)
{
digitalWrite(ledBLU,1);
bluetooth.println(“BLUE ON”);
}
if(BluetoothData==’3′)
{
digitalWrite(ledRED,1);
bluetooth.println(“RED ON”);
}
if(BluetoothData==’4′)
{
digitalWrite(ledWHI,1);
bluetooth.println(“WHITE ON”);
}
if (BluetoothData==’0′)
{
digitalWrite(ledGRN,0);
digitalWrite(ledBLU,0);
digitalWrite(ledRED,0);
digitalWrite(ledWHI,0);
bluetooth.println(“LED’S OFF”);
}
}
delay(100);
}
I've been trying to figure this out for awhile now, and have run out of ideas. Any help would be much appreciated.