Page 1 of 1

Issues with special characters

Posted: Tue Dec 27, 2016 6:50 am
by dkny
Hi there all,

I bought my son an experimenters kit, but some of the projects get a stray \302 error.

I tried using the Fix Encoding and reload, and I can see the problem....spaces are being replaced by special characters...see below

If I delete them all, the code compiles fine. I tried on an old XP windows machine and it works fine. But on my windows 10 I always get these special characters...

any ideas?
Thanks,
Darren.

void setup() {
  for (int thisLed = 0; thisLed < ledCount; thisLed++) {
    pinMode(ledPins[thisLed], OUTPUT);
  }
  pinMode(buttonPin, INPUT);
}

void loop() {
  for (int thisLed = 0; thisLed < ledCount-1; thisLed++) {
    digitalWrite(ledPins[thisLed], HIGH);
    delay(ledDelay);
    while(digitalRead(buttonPin) == HIGH) {
      delay(10);
    }
    digitalWrite(ledPins[thisLed], LOW);
  }
}

Re: Issues with special characters

Posted: Tue Dec 27, 2016 10:15 am
by dkny
Ok - just in case anyone else has this problem, i fixed it by setting the language to English UK (rather than accept operating system default) in preferences (File -> Preferences).

Re: Issues with special characters

Posted: Sat Feb 11, 2017 4:07 am
by cholmes
It is better to copy the code from the "Experimenters Kit Example Sketches" web page rather than the pdf...
http://www.freetronics.com/pages/experi ... e-sketches

Re: Issues with special characters

Posted: Fri Mar 17, 2017 5:59 am
by appytech
dkny thanks for that info very useful.