Serial+joystick+keyboard+mouse Teensy 3.1 W7

Status
Not open for further replies.

RESam

Member
My issue resolved with purchase of Leonardo. Not saying it is the only soution, but it worked for me.
.
Thanks and g'day.
 
Last edited:
WHAT I CAN'T DO IS: --- Send serial data from the python program to the teensy which would tell the teensy which/when keyboard press and joystick routine needs to be sent based on the data sent from the python program.

Why not? This really should work.

Please post the code you tried.
 
My issue resolved with purchase of Leonardo. Not saying it is the only soution, but it worked for me.
.
Thanks and g'day.
 

Attachments

  • 4pjcr0702.jpg
    4pjcr0702.jpg
    261.1 KB · Views: 227
  • 4pjcr0702 2.jpg
    4pjcr0702 2.jpg
    267.4 KB · Views: 169
Last edited:
I only have a few minutes, so here's a quick test.

I ran your program on a Teensy 3.1 (turning those '*' back into spaces). I set Tools > USB Type to "Serial + Keyboard + Mouse + Joystick" and clicked Upload.

Then set Tools > Serial port to /dev/ttyACM1, which is the correct port name in this case for running on my Linux machine. I opened the serial monitor typed "test" in the input field, then I clicked the "Send" button.

The LED started blinking and zeros started printing. Here's a screenshot:

sc.png

So, my first advice is to try doing this simple test on your computer. See if you can get the LED blinking and zeros appearing in the serial monitor first. The serial monitor is a known-good way to test.

I'm not a python programmer, and I don't use Windows much, but my guess is your Python program probably depends on Uno's behavior where simply opening the serial port causes a hardware reboot of the ATMEGA328 chip.

Teensy does NOT reboot when you simply open the port. It will send the "1" only moments after you upload, before your Python program could possibly open the serial port. I don't know why it would crash if no "1" arrives... again, I'm not a Python programmer, nor really a Windows user. But the times I've used Windows, it seems to crash a lot, so maybe it's a Windows thing?

As far as Teensy is concerned, you really need to test with the serial monitor first. If you post another program, try to get the spaces ok, so it can be simply copied and pasted into Arduino to run it.
 
Thanks.
Will try once again in the morning and then advise on results.

EDITED 7/11 ... My issue resolved with purchase of Leonardo. Not saying it is the only soution, but it worked for me.
.
Thanks and g'day.
 
Last edited:
Status
Not open for further replies.
Back
Top