Keypad and Keyboard library won't compile using teensyduino 1.26

trzone

Member
I tried a few variations of installs:

Teensyduino 1.25 with Arduino 1.6.3 - WORKING (what I ran for awhile before updating)
Teensyduino 1.26 with Arduino 1.6.6 - NOT WORKING (what I upgraded too)
Teensyduino 1.26 with Arduino 1.6.5-r5 - NOT WORKING (a test to see if Arduino was the cause)
Teensyduino 1.25 with Arduino 1.6.5-r5 - IS WORKING (next logical test, Teensyduino down one step, proves Arduino is not the cause)

From the above tests, I can conclude that the problem is with the new Teensyduino libraries, not Arduino.
Further experiments with my code made the compiler complain MANY TIMES about this:

...\hardware\teensy\avr\libraries\Keypad\Keypad.h

FYI here's my code
https://github.com/trZone/NPKC_17_Teensy3.2
 
Thanks Paul.
If it means anything... the reason I upgraded was so I could have something like CompleteHID
I'm trying to find a library... or multiple libraries all sourced in one sketch that achieve "Consumer Control Device" media keys as well as regular keystrokes.
Teensyduino 1.25 keyboard library is amazing btw.. so much can be done with a couple dozen lines of code
 
Sorry for the long delay. Finally looked into this.

Turns out KEY_H is conflicting with Teensy's USB keyboard definitions. Here's an improved Key.h that fixes the problem.

I've updated Teensyduino's copy, so this will be fixed in all future versions. I also send a pull request, so hopefully other copies of the library will be updated.

https://github.com/Chris--A/Keypad/pull/2
 

Attachments

  • Key.h
    1.7 KB · Views: 106
FYI

I just had the same problem with Arduino 1.6.7 and TD 1.27

I used the Key.h file from above and now it compiles so it looks like the original file made it back into TD 1.27 somehow.
 
This was fixed 5 days after 1.27 was released.

It'll be in the 1.28 release...

Hm.... I noticed that 1.27 lost key definitions that the Teensy library had... like...
KEY_DASH

and case breaks that make things easier:

Case RELEASED

Case HELD

Maybe 1.28 will fix that as well?
 
Back
Top