Problem with three buttons

Status
Not open for further replies.

iceball

New member
Hello,
i am new in developing with teensy boards.

I have created a box with three Buttons and each button should send a different Keyboard Signal.

But at the Moment each button send the same Keyboard Signal.

Maybe i do something wrong ;-)


Teensy-LC

/*
* Button.pde
*/

void setup() {
Serial.begin(9600);
pinMode(12, INPUT);
pinMode(11, INPUT);
pinMode(9, INPUT);
delay(500);
}

void loop() {
if (digitalRead(12) == LOW) {
Keyboard.print("p");
delay(10);
}
if (digitalRead(11) == LOW) {
Keyboard.print("s");
delay(10);
}
if (digitalRead(9) == LOW) {
Keyboard.print("f");
delay(10);
}

}
 
Status
Not open for further replies.
Back
Top