{"id":492,"date":"2011-12-28T12:20:50","date_gmt":"2011-12-28T10:20:50","guid":{"rendered":"http:\/\/tomashg.com\/?p=492"},"modified":"2012-02-15T15:57:47","modified_gmt":"2012-02-15T13:57:47","slug":"button-pad-act-iii-driver-wars","status":"publish","type":"post","link":"https:\/\/tomashg.com\/?p=492","title":{"rendered":"[b]utton Pad ACT III (driver wars)"},"content":{"rendered":"<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/buttonPad.jpg\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/buttonPad-300x225.jpg\" alt=\"\" title=\"buttonPad\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-513\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/buttonPad-300x225.jpg 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/buttonPad-1024x768.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/laserCut.jpg\"><img decoding=\"async\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/laserCut-300x181.jpg\" alt=\"\" title=\"laserCut\" width=\"300\" height=\"181\" class=\"alignnone size-medium wp-image-518\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/laserCut-300x181.jpg 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/laserCut-1024x619.jpg 1024w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/laserCut.jpg 1909w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>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&#215;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.<\/p>\n<p>Here is the board and buttons layout<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/boardlayout.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-497\" title=\"boardlayout\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/boardlayout-300x161.png\" alt=\"\" width=\"300\" height=\"161\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/boardlayout-300x161.png 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/boardlayout.png 798w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>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 <code>#010AFF<\/code> and <code>#010A00<\/code> on release, where the leftmost byte is the board number then the button number and release or pressed state.<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/recieveButtons.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/recieveButtons-300x93.png\" alt=\"\" title=\"recieveButtons\" width=\"300\" height=\"93\" class=\"alignnone size-medium wp-image-501\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/recieveButtons-300x93.png 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/recieveButtons.png 370w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>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 <code>$1FFFFFFFFFFFFFFFF<\/code> sets the whole board blue, and  <code>$40001000000008000<\/code> sets the lower left and upper right corner LEDs to red. Here is a more detailed diagram for the command.<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/setFrame.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/setFrame-300x103.png\" alt=\"\" title=\"setFrame\" width=\"300\" height=\"103\" class=\"alignnone size-medium wp-image-505\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/setFrame-300x103.png 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/setFrame.png 519w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The color is determined from the color code in this way.<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/colorCode.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/colorCode-150x150.png\" alt=\"\" title=\"colorCode\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-506\" \/><\/a><\/p>\n<p>And the frame for one board looks like this.<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/boardFrame.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/boardFrame-300x41.png\" alt=\"\" title=\"boardFrame\" width=\"300\" height=\"41\" class=\"alignnone size-medium wp-image-509\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/boardFrame-300x41.png 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/12\/boardFrame.png 661w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p><iframe width=\"560\" height=\"315\" src=\"http:\/\/www.youtube.com\/embed\/pu5jN4utEaI\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79,112,32],"tags":[95,102,110,111,93,109,76,97],"class_list":["post-492","post","type-post","status-publish","format-standard","hentry","category-arduino","category-controllers","category-technology","tag-ableton","tag-button-pad","tag-firmware","tag-mlr","tag-monome","tag-osc","tag-processing","tag-renoise"],"_links":{"self":[{"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/posts\/492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tomashg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=492"}],"version-history":[{"count":24,"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/posts\/492\/revisions"}],"predecessor-version":[{"id":528,"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/posts\/492\/revisions\/528"}],"wp:attachment":[{"href":"https:\/\/tomashg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tomashg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tomashg.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}