When I want to write the value of a potentiometer like a keyboard, leonardo ranscribe me wrong symbol "-" .... by serial write it well, but with the keyboard function writes me 'instead of -
Someone comes up with a solution? any ideas?
When I want to write the value of a potentiometer like a keyboard, leonardo ranscribe me wrong symbol "-" .... by serial write it well, but with the keyboard function writes me 'instead of -
Someone comes up with a solution? any ideas?
Read this before posting a programming question
My idea is that you post your code.
ok, here is the code... but the problem i think is not the code....
void setup()
{
Serial.begin(9600);
} // FIN DEL SETUP
void loop()
{
int llaveposf = 7;
int llaveposfval = digitalRead(llaveposf);
int joyy = analogRead(10);
int joyytiltf;
if(llaveposfval == HIGH){
joyytiltf = map(joyy, 0, 1028, -123, 123);
Keyboard.print("Fixed Tilt = ");
Keyboard.println(joyytiltf);
Serial.print("Fixed - Tilt => ");
Serial.println(joyytiltf); }
} // cierre del loop
and the diference is
on serial:
Fixed - Tilt => -270
and on the notepad:
Fixed Tilt = '270
What keyboard type do you have. US? Or something else?
The code turns the ASCII strings into USB scan codes, and it may have the wrong scan code for your installed keyboard type.
THANKS!!!! Really easy and stupid.... thanks again