Commit d50c9956 authored by thcl's avatar thcl
Browse files

Open loop implemented for calibration

parent fc77752d
......@@ -20,7 +20,7 @@ int Zoffset = 0;
// This is the difference in encoder tics from the Z index to
// the electrical encoder zero (which is found by powering the
// AB block and waiting for the motor to settle)
int hard_coded_offset = 304;
int hard_coded_offset = -1051;
// how long in microsec (us) to delay between phases while calibrating
// the wheel
......@@ -165,8 +165,13 @@ int calibrate_encoder(void)
//worst case needs 6 full electrical rotations
Serial.println("STARTING CALIBRATION");
while(1){
Serial.println("TURN FOR MANUEL CALIBRATION");
delayMicroseconds(100000); //0.1 sec delay
for(int p = 1; p <= 6; p++)
{
set_block_phase(p);
int myDelay = 28500;
delayMicroseconds(myDelay);
}
if(calibrated == true){
//ditch the interrupt
turn_all_off();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment