The letters are printed out like they should, but only some of the symbols are right. My first guess was some error with the keyboard layout, but I'm using a swedish layout, so it would either have been in swedish (right) or english (wrong), but it wouldn't have included an Ä (swedish letter) if it would have been english.
Any ideas?
I'm not entirely sure this is the right forum, as I don't know if it's a problem with my code or with Arduino.
I had to change the keyboard layout on my computer to English (US). There perhaps should be a note about this somewhere.
Jan
EDIT: Ok, that was only half of the truth, looking through the arduino sources I can confirm that it's a US keyboard (as far as I can understand it), but it seems I'm using the wrong model of keyboard. I've tried Generic 101/102/104/105-key, but they all have the same problem (y instead of ¤ and : instead of ; ). Anybody who knows which model of keyboard works best with the Arduino?
Then you know you can program the ascii values as integers and have them sent as chars. Did you work out why you are sending 59 and getting 58?
You also know the character you see in the IDE, programmed into your Arduino is not a character, but an ascii code - an 8 bit integer value, being displayed depending on the font selected in the IDE.
So the fact that it does not appear on the Pi screen has nothing to do with symbols, or the keyboard, but the character set enabled in the Pi.
You mean I should try Keyboard.write(59) instead of Keyboard.write(';')? If it's that (I may have missunderstood): I really don't think there's a bug like that in the AVR compiler...
ASCII is a scheme for mapping numbers <-> characters, yes I know I'm sending an ASCII code.
Also, for some reason Keyboard.write(';') writes an ; now, using my Arduino program that is controlled via another program (on the RPi), it doesn't. I have confirmed that it's a ; that is sent (if(data == ';') digitalWrite(13, !digitalRead(13));), but it still outputs a :
What is the ascii code of the symbols that do not display properly? ( I asked "do you know what ascii code it is", not "do you know what ascii code is"). A subtle but important difference I know you know what ascii code is. I am asking what is the ascii code of the symbols.
If the ; --> : then it's possible the symbols are doing a similar thing. Or does nothing print at all?
Typing ; on my swedish keyboard requried me to type Shift + ,
I then sent ; to the arduino, but ; + Shift equaled :, so that's why I got an :
This means I have to remove the Shift and only send ;