Close

Alive with a Teensy 3.5 microcontroller

A project log for Repurposing an Accom Axial Control Panel

Turning an obsolete video editor console into a mothership-sized keyboard + trackball + stream deck

noughtnautnoughtnaut 10/17/2022 at 22:320 Comments

...would be an inaccurate title. But, I felt it about time to post an update.

# New brains!

Now that I've received the Teensy 3.5 that Paul Stoffregen was kind enough to sell me, what's actually going on is that I've got the ribbon cable (ie. three of the boards) hooked up to the new microcontroller.

Teensy 3.5 connected to ribbon cable
Teensy 3.5 connected to ribbon cable

Obviously, that there is not going to be the final placement. The plan is to have it placed neatly inside and expose a USB device socket on the back. I have already installed a C7 ("figure 8") socket in the back and connected it to a repurposed half-broken USB charger, and to a power supply originally intended for 12V drop ceiling lights. This will provide ample 5V and 12V power for the main board.

Without much planning, I chucked the Teensy onto a breadboard, placed a 34-pin ribbon cable socket next to it, and soldered away! There are no mistakes or shorts ... but there's a reason I'm only showing you the one side here. The rolled-up bundle of wires is with the intent to route the "reset and reload" button to a classic "reset hole" on the back of the enclosure.

# Old woes...

I admit it: I'm rusty! It must have been 1995 or so that I last wrote a line of C code. The Teensy (ditto Arduino and their compatibles in general) runs C++ which ... I may have read a book on ... long ago. Nevertheless, I've got a few threads going to run a heartbeat, cycle the demultiplexers and monitoring the 8 return lines for keypresses ... as well as a fun little light show on the 5 keys that have LEDs in them, because why the hell not.

On the Raspberry, which supports Python, I had nice sets of key-value maps for the demultiplexers and a simple and neat csv file to store the keymap. C doesn't offer key-value maps, and although the Teensy has an onboard SD card reader, there's no built-in file system library. So I've been making all sorts of dumb mistakes in recreating the triple-for-loop from the Raspberry's Python to the Teensy's C. (Tip: it doesn't help to do this sort of work when you're tired. Who'da thunk?)

Right now I'm (procrastinating) working on prototyping the USB device-mode keyboard output, implementing the keymap configuration, and investigating the need/interest of using event interrupts (rather than thread loops) to capture key presses. I've not made a final decision yet whether I'm going to re-use the existing decoding and multiplexing of the rotary encoders and trackball, or to reroute them directly to a bunch of GPIO pins on the Teensy which are still unused. Comments are welcome on this.

Discussions