1.2 KiB
MidiStepper
Made for an old (AnyCubic) Trigorilla-Board from an 3D-Printer. Also compatible with Arduino Nano and old floppy drives.
Floppy pins:
.....j..DS.......
..G5 . ...j..GG.......
j: jumper (drive select)
D: direction
S: step
G: corresponding ground
5: 5V for the motors
Caveats:
The ATmega2560 has 6 timers, so we can use them to generate the square waves for the steps. Be aware that delay() and similar arduino-functions will not work as expected if you extend this and use Timer0. RAMPS14-compatible boards have only 5 stepper drivers, so we're fine. Other arduinos don't have enough timer peripherals, so we generate them in software. This could be done in an ISR. See: https://www.youtube.com/watch?v=fHAO7SW-SZI
Usage:
The arduino part accepts raw midi messages over its serial interface. baudrate is 115200. Use the python script send.py to send midi files over the serial port. It can also act as a virtual midi port.
Compile:
$ git clone
$ virtualenv -p python --no-site-packages .
$ source bin/activate
$ pip install -U platformio
$ pio run
$ pio run -t upload