wallsofsound
Member
So I am currently able to mimic a spacebar on 2 Macbook pro's simultaneously. And I am trying to add an escape key.I have tried "we print esc" and that seems to do same as space but on pin 1, I also tried we print a h same deal mimics space bar on pin 1.Excuse my ignorance as this is new to me.
FYI I am trying to find a simple way to trigger and escape out of two macs playing Qlab I have the go part down but code was already made. So now I am slowly learning. I can assign any key to do several things.
FYI I am trying to find a simple way to trigger and escape out of two macs playing Qlab I have the go part down but code was already made. So now I am slowly learning. I can assign any key to do several things.
Code:
/*
* Button.pde
*/
void setup() {
Serial.begin(9600);
pinMode(10, INPUT_PULLUP);
delay(5);
pinMode(1, INPUT_PULLUP);
delay(5);
}
void loop() {
if (digitalRead(10) == HIGH)
delay(10);
else
Keyboard.print(" "); // we print a space
delay(10);
if (digitalRead(1) == HIGH)
delay(10);
else
Keyboard.print(" "); // we print a h
}
// put your main code here, to run repeatedly: