{"id":42577924,"url":"https://github.com/armand1m/0x66err_ctrl","last_synced_at":"2026-01-28T22:01:43.004Z","repository":{"id":248611547,"uuid":"828881631","full_name":"armand1m/0x66err_ctrl","owner":"armand1m","description":"my own midi controller built on top of arduino mega 2560 r3. very much early days but it is nice","archived":false,"fork":false,"pushed_at":"2024-08-05T21:44:00.000Z","size":57099,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T09:39:10.170Z","etag":null,"topics":["arduino","controller","midi","music"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/armand1m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-15T10:09:39.000Z","updated_at":"2024-08-04T00:18:40.000Z","dependencies_parsed_at":"2024-08-02T03:49:36.941Z","dependency_job_id":null,"html_url":"https://github.com/armand1m/0x66err_ctrl","commit_stats":null,"previous_names":["armand1m/midiampcontroller","armand1m/0x66err_ctrl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/armand1m/0x66err_ctrl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2F0x66err_ctrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2F0x66err_ctrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2F0x66err_ctrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2F0x66err_ctrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armand1m","download_url":"https://codeload.github.com/armand1m/0x66err_ctrl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armand1m%2F0x66err_ctrl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28853194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","controller","midi","music"],"created_at":"2026-01-28T22:01:42.080Z","updated_at":"2026-01-28T22:01:42.988Z","avatar_url":"https://github.com/armand1m.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 0x66err_ctrl\n\n0x66err_ctrl is a DIY MIDI Controller on top of Arduino Mega 2560 R3.\n\nIn the current prototype, it features a LCD 3.5\" 480x320 touchscreen and 4 rotary encoders.\n\n![Initial prototype](https://github.com/armand1m/0x66err_ctrl/blob/main/assets/ctrl.jpeg)\n\nhttps://github.com/armand1m/0x66err_ctrl/raw/main/assets/xymap.mp4\n\n## Features:\n\n- [x] 7-band EQ on Touchscreen\n    - [x] on touch enabled\n    - [x] on software change enabled\n- [x] 3 toggles\n    - [x] on touch enabled\n    - [x] on knob click enabled\n    - [x] on software change enabled\n- [x] 4 rotary encoders for knob control \n    - [ ] on touch enabled\n    - [x] on knob position change enabled\n    - [x] on software change enabled\n- [x] Multi Page Control\n    - Having a navigation system means it gets easier to add new features.\n- [x] Touchscreen XY map  _(x being frequency and y being resonance)_\n    - Useful for certain things like Ableton's Autofilter _(map X to the Frequency knob, and Y to the Resonance)_\n- [x] Sync MIDI messages from software to hardware\n    - Changing mapped properties in Ableton will change them in the device as well.\n- [x] 4 Channel Selection for both Amp page and XYMap page\n    - You can switch between 4 midi channels individually on each page for each device.\n- [x] Storing settings and selections on EEPROM\n- [x] Syncing from DAW into EEPROM\n\n### Next in line:\n\n- [ ] 8 rotary encoders\n- [ ] Preset selection screen\n- [ ] 4x4 drumpad physical module\n\n### Future:\n\n- [ ] 7-band EQ physical module\n- [ ] Momentary gates _(to enable things like killswitches)_\n\n## Hardware\n\n- [TFT-LCD 3.5\" 480x320 display, ILI9486 driver](https://www.amazon.nl/dp/B07Y6179LG)\n- [4 Rotary encoders](https://www.amazon.nl/WayinTop-Roterende-Encoder-Module-Drukknop/dp/B07T3672VK)\n- [Arduino Mega 2560 R3](https://store.arduino.cc/products/arduino-mega-2560-rev3)\n\n## Building\n\nThis project comes with a `Makefile` that helps a lot with managing and building the firmware. \n\n### Setup \n\n**Important:** Make sure you have `clang-format` and `arduino-cli` installed in the host.\n\nYou probably will need to change the `PORT` in the `Makefile` to match the device in your host. \n\nYou can use `make list_boards` to list the available connected ports.\n\nOnce that is all in place, you can use the commands:\n\n```sh\n# will build the firmware\nmake build\n\n# will upload the firmware\nmake upload\n\n# will do both by default\nmake\n```\n\nIt also offers other utilities\n\n```sh\n# will format the whole code\nmake format\n\n# will install all external dependencies\nmake install_libs\n\n# will clean the build folder\nmake clean\n\n# will connect and render serial messages (make sure to set the correct PORT and BAUD rate)\nmake serial\n\n# disconnect from serial\nmake stop_serial\n\n# flashes the hiduino firwmare onto atmega16u2\nmake flash_hiduino\n\n# flashes the original firwmare onto atmega16u2\nmake flash_original\n```\n\n## Libraries\n\n### UI and Touchscreen Events\n\nUI is powered by GUISlice: https://github.com/ImpulseAdventure/GUIslice\n\nGUISlice offers not only touch-compatible components out of the box\nand it also provides LCD and touchscreen setup and configuration examples.\n\nIt is super well documented and works perfectly with the hardware chosen here.\n\nThe UI is built using the GUISlice Builder, with some extra twirks directly in code.\n\nYou can start the GUISliceBuilder app using the following command:\n\n```sh\ncd ./tooling/GUIsliceBuilder\n./GUIslice.sh\n```\n\nThen you can open the project at `tooling/GUISliceProjects/GUISliceProject.prj`\n\n![Project](https://github.com/armand1m/0x66err_ctrl/blob/main/assets/uiproject.png)\n\n#### Code Generation\n\nThe GUISliceBuilder features code generation and that can be used to get positions and all of that.\n\nHowever, the code structure in the project is wrapped into my own \"react-like\" abstraction so I have an easier time updating and implementing new features. You'll probably have to convert some of that and make it match.\n\n#### Fork\n\nGUIslice is forked into this repo under the `libraries/GUIslice` because it demans a selected `GUIslice_config.h` to be enabled for a build. Since I made this for my own, I forked it into the repo and added my TFT config hardcoded. \n\nI might extract that into a different file for easy toggling, but not a priority.\n\nIt also has the following flags commented which are fairly handy for debugging issues:\n\n```c\n#define DEBUG_ERR     2   // 1,2 to enable, 0 to disable\n#define DBG_LOG           // Enable debugging log output\n#define DBG_TOUCH         // Enable debugging of touch-presses\n#define DBG_FRAME_RATE    // Enable diagnostic frame rate reporting\n#define DBG_DRAW_IMM      // Enable immediate rendering of drawing primitives\n#define DBG_DRIVER        // Enable graphics driver debug reporting\n```\n\nAs well as an enabled PROGMEM flag which enables rendering elements into flash memory instead of RAM, thus making the most out of such a small device as an arduino.\n\nUnfortunately, rendering those elements demands me to use the macros GUIslice made available in a static matter, so the code might not be the easiest or the most readable, but it certainly is the most performatic and memory-saving one.\n\n### Rotary Encoders\n\nRotary Encoders are powered by the `EncoderButton` library: https://github.com/Stutchbury/EncoderButton\n\nEncoderButton offers an event-based API for using rotary encoders. It manages all the rotary states and it triggers given callbacks for specific events.\nIt already gives you support to attribute identifiers to every rotary encoder, which comes in handy.\n\nThe library is thin-wrapper built on top of the well-known Encoder library.\nIt adds button click support with clickCount by using the `Bounce2` library.\n\n#### Fork\n\nI did fork the `EncoderButton` library under `libraries/EncoderButton` in this repository.\n\nThe main reasoning was that the `EncoderButton::resetPosition` didn't reset the position in the actual encoder. My fork does that.\nThis was necessary as I'm reading MIDI messages from the DAW and syncing them with the device. \n\n### MIDI support\n\nMIDI is powered by the \u003cMIDI.h\u003e standard library.\n\nMost MIDI events are sent as Control Change events over channel 1.\n\nMIDI events can be debugged during development using the Serial Monitor on 115200 baud.\n\n#### MIDI CC Messages\n\n| Device ID     | CC Value |\n|---------------|----------|\n| KNOB_CC_1     | 16       |\n| KNOB_CC_2     | 17       |\n| KNOB_CC_3     | 18       |\n| KNOB_CC_4     | 19       |\n| SLIDER_CC_1   | 20       |\n| SLIDER_CC_2   | 21       |\n| SLIDER_CC_3   | 22       |\n| SLIDER_CC_4   | 23       |\n| SLIDER_CC_5   | 24       |\n| SLIDER_CC_6   | 25       |\n| SLIDER_CC_7   | 26       |\n| TOGGLE_CC_1   | 28       |\n| TOGGLE_CC_2   | 29       |\n| TOGGLE_CC_3   | 30       |\n| TOGGLE_CC_4   | 31       |\n| XY_MAP_CC_X   | 11       |\n| XY_MAP_CC_Y   | 86       |\n\n### MIDI over USB\n\nSince Arduino Mega 2560 R3 doesn't support MIDI over USB out of the box, you need to flash HIDUINO in the board atmega16u2.\n\nYou can find the scripts and built firmware needed to switch between HIDUINO and the default USBSerial firmwares on this repo.\n\n#### Flashing into atmega16u2\n\n- Uncomment the `#define HIDUINO 1` in the main project file.\n- Flash it into the Arduino Mega 2560 as you'd normally do.\n- Short the RESET and GND pins close to the `atmega16u2` to get it into flash mode.\n- Run `make flash_hiduino`\n- Disconnect device and connect again.\n\nIf you need to make changes to the firmware, you will need to flash the original firmware back into the `atmega16u2`\n\n- Short the RESET and GND pins close to the `atmega16u2` to get it into flash mode.\n- Run `make flash_original`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmand1m%2F0x66err_ctrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmand1m%2F0x66err_ctrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmand1m%2F0x66err_ctrl/lists"}