Need help debugging Teensy LC as HID

Status
Not open for further replies.

olindgallet

New member
Hello,

I have my Teensy LC wired up to a joystick that I want to use as a mouse. However, as soon as I plug it in, my errors in my code make the cursor move around and clicking things. I want to change the code, but having the Teensy plugged in to do so is difficult.

Is there a way to have the Teensy function as a programmable board and not as a HID as soon as it's plugged in?
 
Hello,

I have my Teensy LC wired up to a joystick that I want to use as a mouse. However, as soon as I plug it in, my errors in my code make the cursor move around and clicking things. I want to change the code, but having the Teensy plugged in to do so is difficult.

Is there a way to have the Teensy function as a programmable board and not as a HID as soon as it's plugged in?

I guess, the best way is to plug in Teensy with the prog button kept pressed and only be released after plugged in. This way the teensy does not start the buggy mouse HID program and you can use your regular mouse to move around modify code and try again.
 
As noted by WMXZ, pressing the program button will lock the Teensy into program mode until it gets power cycled or you load updated code, so will do most of what you want when things go pear shaped.

I'm also a big fan of building the hardware with some sort of interlock, even if it's just a pluggable wire on a breadboard that is sensed by the main loop and inhibits any of the mouse/keyboard code from running. Really critical if you have keyboard code running that is making edits in the Arduino window.
 
Status
Not open for further replies.
Back
Top