Teensy 2.0 & Teensy LC keyboard acting up after about 40 seconds connected to Mac

Status
Not open for further replies.

DJMe

New member
I have both a Teensy 2.0 (mini-USB cable) and Teensy LC (micro-USB cable). I’m trying to use an ATARI ST keyboard (connecting TX, RX, 5V & ground) to the Teensy, and the USB on the Teensy is connected to a 2014 Macbook Pro running macOS High Sierra. I downloaded ikbd2usb from GitHub. https://github.com/kelihlodversson/teensyIKBD (also attached to this post). I'm using the Arduino 1.8.10 IDE.

When using this code on the Teensy 2.0, I made no changes. When using it on the Teensy LC, I had to comment out these 3 lines of code for it to compile:

Keyboard.set_modifier(keyboard_report_data[0] & ~(MODIFIERKEY_RIGHT_GUI));
Keyboard.set_modifier(keyboard_report_data[0] | MODIFIERKEY_RIGHT_GUI);
Serial.print(keyboard_report_data[0], HEX);


Whether running the code unmodified on the Teensy 2.0, or running it on the Teensy LC, I have the same problem. The keyboard and mouse work for about 40 seconds, and then either freak out, or it stops working. I’ve tried changing the leads & plugs, as well as, cables. The author of the source code had no problems on his Mac 3 years ago and has since then, started using a PC without any problems.

So, I have 2 problems:

1. My main problem is, what’s the cause of the unstability?
2. My secondary problem is, why can’t the code compile for a Teensy LC without commenting out those 3 lines? Is that extern in the 2.0 library, but not in the LC library?


Error message:

/var/folders/f9/9rv8f03d4179gl2pp09y260h0000gn/T/arduino_build_464705/sketch/ikbd2usb.ino.cpp.o: In function `loop':
/Users/jamiebible/Downloads/teensyIKBD-master/ikbd2usb/ikbd2usb.ino:134: undefined reference to `keyboard_report_data'
collect2: error: ld returned 1 exit status
Error compiling for board Teensy LC.
 

Attachments

  • keymap.ino
    1.3 KB · Views: 45
  • ikbd2usb.ino
    3.6 KB · Views: 47
Looks like there may be a short in the keyboard itself. I switched to a different one, and problem #1 went away.
 
Status
Not open for further replies.
Back
Top