This is the third part of my epic journey through the world of micro-controllers, MIDI/OSC controllers and all that stuff, and finally I can say that I see pleasing results.
The pad now is enclosed in a plywood case which I designed and cut with some help from Eva. Though the individual boards can be only connected serially, this means that a square 8×8 grid was technically not possible as the first USB board can be only connected to one board in the output port. To solve this I physically arranged the boards in a square, but bent the connectors and connected them with jumper wires in the right order.
Here is the board and buttons layout
I managed to come up with a more workable protocol for the button pad with some good tips from Yiannis. Every time a button is pressed, the board sends a signal of the form
#010A00 on release, where the leftmost byte is the board number then the button number and release or pressed state.
To set the LEDs the board receives a command that sets the entire board a specific color if the frame has changed state from the previous cycle. The frame command starts with a command code, followed by the color code and then 8 bytes of frame data. The frame data is split into 4, 2 byte for each board. Then we check each bit to determine if we set the corresponding led on or off. Something similar is going on with the color code to determine which color frames to set. For example
$1FFFFFFFFFFFFFFFF sets the whole board blue, and
$40001000000008000 sets the lower left and upper right corner LEDs to red. Here is a more detailed diagram for the command.
The color is determined from the color code in this way.
And the frame for one board looks like this.
To run the show I wrote two drivers, one that uses OSC protocol and one with MIDI for Duplex in Renoise and Ableton. You can see a small demonstration in the video. I am also developing the [r]otary encoder panel but i will post about it later on :)) Enjoy.
4 thoughts on “[b]utton Pad ACT III (driver wars)”
hey Tomash! really fantastic work here! I bought the usb 4×4 board from sparkfun. im planning on combining it with an apple magic trackpad and make a touch gesture expressive synth/mash up controller using the 4×4 board for overall control and notation. I wanted to ask you if your willing to share the drivers and firmware you’ve written for me to use in this project?? The sparkfun boards are great but leave a lot of skill, knowledge and work on the software side of things to get working. I work with max/msp but the coding you’ve done here is way beyond me.
I’m up for donating some money to you for all the time and effort youve put in to get these boards running straight away without going down the arduinome route.
Please get back to me if your up this? I would be forever appreciative!
you could find my source codes at my Bazaar repository
What ended up happening with putting the arduino bootloader on the master AVR?
Couldn’t get it work properly, in the end I thought it would be a lot easier to simply modify the existing firmware.