jcchurch13 / Mechaduino-Firmware

Hardware available here:
http://tropical-labs.com
Other
389 stars 232 forks source link

PIn mappings for step/dir? #29

Closed osresearch closed 6 years ago

osresearch commented 6 years ago

Which pins are supposed to be used for step and direction? I see in #define step_pin 1 definition in https://github.com/jcchurch13/Mechaduino-Firmware/blob/master/Mechaduino/Mechaduino/Parameters.h#L59 and the schematic looks like it should have external pullups on it, but pulsing pin D1 to ground doesn't seem to make it step in position hold mode or in open-loop mode.

Enabling the control loop with y and using r to set the set points works, so am I missing something or does a different mode need to be enabled?

osresearch commented 6 years ago

Ah, I found it -- yes, the configureStepDir() function needs to be called to enable the step and direction input pins (D1 and D0): https://github.com/jcchurch13/Mechaduino-Firmware/blob/master/Mechaduino/Mechaduino/Mechaduino.ino#L71