Hello I am building a simple button on my Teensy and I set it up so that when pin 2 receives a signal "Low" it will type "A" however, this repeats and if the button is held down even a but it will do multiple A's Like this "AAAAAAAAAAAA" what commands can you recommend so it only types one A until the button is released and pressed again
Attached is what I have so far.
Thanks in Advance!
void setup() {
//Switch Input
pinMode(2, INPUT_PULLUP)
;}
void loop() {
//if pin recieves signal
if (digitalRead(2) == LOW)
{
//type "A"
Keyboard.print("A")
;}
}
A_Button.ino (171 Bytes)