Arduino C++ Stepper motor sketch requires coding for gear drive;
Project detail
Current sketch;
Uses gyro/accel data, filter/Kalman filter, produces degree +/- output writing to stepper motor at 1:1 ratio.
Modify sketch;
Use data from sketch, include a function(multiplication) to modify the output to the stepper motor by a user assigned input, this value should be able to be changed easily (in sketch) to reflect different gearbox drives and user ratios. To start, gear reduction ratio needs to be modified from, 1:1 to 20:1.
Example. For every 1 rotation (360°) of the gear output shaft, the stepper motor shall turn 20 rotations (7200°), positive or negative.
Stepper motor steps per revolution = 200 (for 360°)
Gear = 20:1
Gear output shaft requires 4000 stepper motor steps to complete 1 revolution, positive or negative.