diff --git a/ino/motor_encoder_poc/motor_encoder_poc.ino b/ino/motor_encoder_poc/motor_encoder_poc.ino index d3bb2ae..26c6455 100644 --- a/ino/motor_encoder_poc/motor_encoder_poc.ino +++ b/ino/motor_encoder_poc/motor_encoder_poc.ino @@ -27,7 +27,9 @@ volatile int posi = 0; // specify posi as volatile const long maxTime = 10000; -const int maxPulses = 660; +const int ppr = 11; +const float ratio = 62.0; +const int maxPulses = (int) round((float) ppr * ratio); const int speed = 40; volatile long start = 0; volatile bool done = false; @@ -45,6 +47,14 @@ void setup() { attachInterrupt(digitalPinToInterrupt(ENCA), readEncoder,RISING); + Serial.println("Connected"); + Serial.print("PPR: "); + Serial.println(ppr); + Serial.print("Ratio: "); + Serial.println(ratio); + Serial.print("Pulses: "); + Serial.println(maxPulses); + } void loop() { diff --git a/scad/sprocketed_roller b/scad/sprocketed_roller index b4ea887..4482a47 160000 --- a/scad/sprocketed_roller +++ b/scad/sprocketed_roller @@ -1 +1 @@ -Subproject commit b4ea887d588a3728dfcb0fc64dc9195f278b7b1f +Subproject commit 4482a471bb357e93e9cabe9efaecba0370a3a0bd