Hendrik Langer
f2e6907e37
|
5 years ago | |
---|---|---|
midi | 5 years ago | |
src | 5 years ago | |
test | 5 years ago | |
.gitignore | 5 years ago | |
.travis.yml | 5 years ago | |
README.md | 5 years ago | |
platformio.ini | 5 years ago | |
send.py | 5 years ago | |
send2.py | 5 years ago |
README.md
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