This is short proof of concept showing the use of the SPI based GPIO port expander MCP23S17 to connect two RGB rotary encoders with pushbutton. This chip allows for eight individually addressed MCP23S17 chips to be connected on the same SPI. This allows for a simplified approach to wiring the rotary encoders and their pushbuttons and RGB leds, and also frees up pins on the Teensy. The process uses interrupts. The MCP chip has two ports, A and B, and each port has eight bits that can be set high or low. The state of each bit is stored and sent to Teensy on an interrupt.
The additional leds above the rotary encoders are ws2811 being driven from a separate pin on the Teensy. This is being used to indicate that the rotary encoder value is changing, The colour fo the led is set by the value stored for each encoder, just as a visual indicator of working. The value stored for each encoder will be used to drive sequencer values.
The board is a home made acid etched pcb to PoC the layout and connections. This set up is to allow for a modular approach to building the 16 rotary encoder controller steps of a sequencer using eight modules in a chain.
The rotary encoder button changes colour when pushed, and goes back when pushed again. It is red when encoder value is less than zero, and turns blue when value is greater than zero