I am detecting an event in a game using python on a win7 machine. Because I am unable to send a keypress to a focused window (the game) using python, I send a flag to teenys3.1 via serial when I want the teensy to start sending the keyboard data.
.
Both work ok independently but can not work in the same sketch because one takes the USB type of "serial" and the other "keyboard + mouse + joystick".
Should I have bought the Leonardo instead of the teensy3.1? Can I get the teensy3.1 to listen for serial data from the python program and also send keyboard.print data to the focused game program?
First time back after several years away ... still a n00b!
FYI ---Also have an Arduino Duemilanove with Atemga328 that I made a remote camera trigger with many moons ago.
void setup() {
Serial.begin(9600);
delay(1000);
}void loop() {
// Your computer will receive these characters from a USB keyboard.
Keyboard.print("e");
delay(130);
Keyboard.print("e");
delay(130);