Interest in adding rotary encoders and frame buffer LCD? - Printable Version +- HomSpace Forum (https://homspace.nl/forum) +-- Forum: SamplerBox (https://homspace.nl/forum/forum-1.html) +--- Forum: Community (https://homspace.nl/forum/forum-2.html) +--- Thread: Interest in adding rotary encoders and frame buffer LCD? (/thread-76.html) |
Interest in adding rotary encoders and frame buffer LCD? - Squar0L - 16-11-21 I wonder if anyone interested in adding/using MCP23017 based rotary encoders instead of push buttons and frame buffer based LCD instead direct SPI drivers. It will make the Zynthian hardware and SamplerBox compatible and you can go back and forth. I have some rotary and frame buffer/pygame code working. If there's interest I'll clean it up and send a PR. RE: Interest in adding rotary encoders and frame buffer LCD? - hansehv - 19-11-21 Hi Squar0L, Both are interesting. I never got to adding rotary encoder support for the simple reason I don't use buttons anymore and therefor don't have the hardware. But it sure is an enhancement for those using buttons (and perhaps for me in future), because the menu system is cumbersome via buttons alone. However I believe they can be attached to the available ports without needing an extra MCP23017. And as I see it, the menu system can be operated with two buttons and one rotary ending in the need of 4 data pins - which are available. But you may have made another setup. Besides, it may be a good idea to use an MCP, because then the occasional noise of the direct GPIO attached hardware might be suppressed (interesting thing to test..) Framebuffer display is even more interesting.
So I welcome PR's, some notes on this: Please make separate optional modules. I am about to release a new version which some serious changes:
So options are to wait till the release (around christmas) or send me a PM to discuss a workaround. The python3 branch on GitHub is subject to updates, so for the moment use this for information/introduction only. At release date it will be transferred to master and the python2 version will become a separate frozen branch. Thanks for your input! Hans RE: Interest in adding rotary encoders and frame buffer LCD? - Squar0L - 21-11-21 Hi Hans, I've added wiring to access i2c, and pygame/pygame-menu for framebuffer support. Here is the snippet from the Dockerfile I use to build the image: Code: RUN apt-get update && \ Pygame fully abstracts out the details of the display. I'm using a 320x240 SPI attached 2.4" Adafruit PiTFT LCD. Not using the resistive touchscreen, I could have. I wrote a rotary encoder python driver to feed into the pygame event queue, to look like a keyboard, so the pygame-menu operates off the encoders. No audible artifacts of any kind when using them during audio play. RE: Interest in adding rotary encoders and frame buffer LCD? - bbishop - 25-11-21 (21-11-21, 16:47)Squar0L Wrote: Hi Hans, I'm very interested in your use of pygame to repackage the menu system, I've been looking for a way to display information from pure data (which I'm running alongside samplerbox for audio processing and digital synthesizer voices) while the menu system isn't actively engaged (my dream would be to plot wavetable coordinates onto the display as a sort of oscilloscope, or even just print the function and value of the last midi cc used) RE: Interest in adding rotary encoders and frame buffer LCD? - Squar0L - 25-11-21 (25-11-21, 00:34)bbishop Wrote: I'm very interested in your use of pygame to repackage the menu system, I've been looking for a way to display information from pure data (which I'm running alongside samplerbox for audio processing and digital synthesizer voices) while the menu system isn't actively engaged (my dream would be to plot wavetable coordinates onto the display as a sort of oscilloscope, or even just print the function and value of the last midi cc used) Please take a look at the new fork of Hans's repo, under Python3-migration |