Found ratio, seemingly 11PRR x 62:1 motor gearbox.

This commit is contained in:
Matt McWilliams 2024-01-13 01:33:07 -05:00
parent 6eb06ca724
commit 86b41954a5
2 changed files with 12 additions and 2 deletions

View File

@ -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() {

@ -1 +1 @@
Subproject commit b4ea887d588a3728dfcb0fc64dc9195f278b7b1f
Subproject commit 4482a471bb357e93e9cabe9efaecba0370a3a0bd