Author Topic: Wireless keyboard using Adafruit Feather 32u4 LE and TMK  (Read 6751 times)

0 Members and 1 Guest are viewing this topic.

Offline kanzakisol

  • Thread Starter
  • Posts: 5
Wireless keyboard using Adafruit Feather 32u4 LE and TMK
« on: Fri, 24 June 2016, 09:17:18 »
Hi, I'm currently working on trying to make the transition from using a Teensy + Bluefruit EZ-key combo for my wireless keyboard to just using the Adafruit Feather 32u4 (all with Hasu's wonderful TMK firmware). At this point I have the Feather fully replacing the Teensy and can do wireless using Feather + EZ-key, however, I'm trying to get the Feather to pass the data through BT by itself instead. I know the Feather supports HID just like the EZ-key, so I feel like the changes should be minor but I'm also pretty ignorant to coding stuff, so I'm now sure if it's actually a possibility. So far I've tried to use code from here (https://github.com/adafruit/Adafruit_BluefruitLE_nRF51/blob/master/examples/hidcontrolkey/hidcontrolkey.ino) to replace the USART stuff in config.h, but that didn't work. I added what I think area all the relevant files for how I'm running the Feather+EZ-key setup now, so I'm assuming something among them needs to be changed/added. If anyone has any insight on what I should be looking for/doing or what I'm just totally ignorant of, your guidance would be awesome as I've exhausted my google prowess so far lol.

Offline hasu

  • Posts: 3475
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Wireless keyboard using Adafruit Feather 32u4 LE and TMK
« Reply #1 on: Fri, 24 June 2016, 10:34:37 »
Bluefruit LE use different commands from Bluefruit EZ-key. That bluefruit.c code doesn't support Bluefruit LE.

See these, you'll have to write code to support it.
https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/ble-services#at-plus-blekeyboarden
https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/sending-keys-via-serial#raw-hid-keyboard-reports

Offline kanzakisol

  • Thread Starter
  • Posts: 5
Re: Wireless keyboard using Adafruit Feather 32u4 LE and TMK
« Reply #2 on: Fri, 24 June 2016, 14:08:14 »
Dammit Hasu this is why you're awesome. Okay I see what you mean now how the protocols are defined differently with LE. I think I know what definitions I need to put, I'm just not really sure where they should go. Should I maybe make a define.h file that gets referenced by the bluefruit.c? Please, bare with me if that sounds retarded lol, I'm working on a limited understanding  :-[.

Offline MajorKoos

  • Posts: 851
  • Location: Bay Area
  • 1 life please. Extra large.
Re: Wireless keyboard using Adafruit Feather 32u4 LE and TMK
« Reply #3 on: Sun, 26 June 2016, 10:08:40 »
I've also got a pair of these and some designs on making a BT keyboard - having BT and a charger on the same board is super handy.  What keeps stumping me though is the lack of pins - only 16 are really usable and I haven't figured out how to do an 8x8 matrix yet.

Offline kanzakisol

  • Thread Starter
  • Posts: 5
Re: Wireless keyboard using Adafruit Feather 32u4 LE and TMK
« Reply #4 on: Thu, 30 June 2016, 14:25:09 »
Just as an update, after reading more thoroughly into the subject and weighing my options, I've decided to abandon plans for using the BLE on the Feather with my setup. I'm still using the Feather instead of the Teensy (since it has lower power consumption) but since it would require far more coding and knowledge than I thought to implement the BLE I'll have to continue without it. After I'm done with my current project I may circle around after I learn more about it. I appreciate the help!

As for the 8X8, I tested out using rows on C7, D6, B7, B6, B5, D7, C6, D0 and columns on F7, F6, F5, F4, F0, D1, B1 and it worked out fine. When I strayed to MOSI and MISO though it started going haywire. In case you're not sure about the pinout here's the link https://cdn-learn.adafruit.com/assets/assets/000/030/930/original/adafruit_products_2889_pinout_v1_0.png?1457306365