-
11Program, Tune, and Test!
At this point, it's time to load the Arduino Sketch onto the device and try it out. Please note, this only works for the Arduino Due!
You'll need to download the "MIDIUSB" library from Arduino.
https://www.arduino.cc/en/Reference/MIDIUSB
After you download the .zip file, make sure to unzip it into a local folder before opening, and make sure the ".h" files are in the same folder.
Note: I use the same code for my Semi-Manual Electric Rail Kalimba project, so apologies about a lot of the inconsistencies in the naming!
The program serves as sort of a generic MIDI-over-USB-to-Stepper-Position translator, and the "pulleyPositions.h" file contains all the relevant positions for the usable notes in the scale (a bit more than an octave for the "long" system). Unfortunately, this will change a little bit for every system, so it will require some tuning. I've got an option to do this in there via serial commands. To do this, simply un-comment (remove the "//" from) the ISTUNING definition, and program the Due. Make sure
Then, using serial commands, type in a non-zero position, and it will step there. As you're tuning, update the pulleyPositions.h file. I recommend using either a physical guitar/instrument tuner or an app for doing this tuning step unless you've got a really good ear / perfect pitch... (I don't).
When you've got all those positions in the scale tuned and have updated the pulleyPositions.h file, re-program the board, and then switch over the USB connection to the Due's Native USB Port.
Plug into your PC, and use your favorite DAW and/or MIDI-over-USB software. I've found setting up an instrument in LMMS to be a really easy and free workflow for getting this up and running, so I'd recommend that if you don't already have a way to do this.
At this point, it's time to test and rock out!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
You can buy all control accessories from one website
1. Stepping motor (17HT19S4085 as an example):
https://www.motiongoo.com/index.php?route=product/product&product_id=67&search=17HT19S4085
2. Stepper motor drive board A4988:
https://www.motiongoo.com/index.php?route=product/product&path=59_120&product_id=389
3. CNC Shield interface board:
https://www.motiongoo.com/index.php?route=product/product&path=59_123&product_id=464
4. Arduino UNO:
https://www.motiongoo.com/index.php?route=product/product&path=59_113&product_id=290
Are you sure? yes | no