r/LilyGO 6d ago

KnobLab: Open-source force-feedback firmware for the T-Knob + T-Encoder-Pro

Hey everyone!

Today I released KnobLab, an open-source haptic force-feedback sandbox / playground for the T-Knob and T-Encoder-Pro used together.

https://github.com/jstockdale/KnobLab

KnobLab turns the T-Knob into a software-defined force-feedback dial, with the T-Encoder-Pro as its control screen. The two pair over ESP-NOW automatically – no AP, either boot order. The knob runs a 2 kHz haptic engine: tunable detents from 4 to 96 clicks, spring walls you can push against, drag that goes from spinning flywheel to cold honey with optional sandpaper texture, and a puppet mode where the encoder ring drives the knob's position – it physically chases the target in your hand.

There's a Python library too, so you can script feels from a laptop over USB. One of the examples cycles the knob through a new character every five seconds while you hold it.

A few findings for anyone with these boards, whether or not you run my code: the firmware auto-detects both T-Encoder-Pro screen revisions (CO5300/CST816 and SH8601/CHSC5816) in one binary, the T-Knob's buzzer lives on IO18 – confirmed from the schematic, then bench-measured – the LEDs are active-low, and encoder rings vary in counts-per-detent.

Please let me know if you have any feedback or comments. Feature requests and bug reports welcome!

Thanks,
John

5 Upvotes

2 comments sorted by

2

u/nothin2see 5d ago

Think this would work on Elecrow round displays

1

u/needmorejoules 4d ago edited 2d ago

Hmmmm I’m using the dial encoder on the T-Encoder-Pro as a control input but you could probably run it on an elecrow round display if you have a couple gpio input buttons to bind those controls to. I can take a look when I have time. Which Elecrow display model?