I am new to microbasic, but not new to programming, and am trying to get a homing code to find the reverse limit switch on boot up. I downloaded an example of a home finding script from here:
and have been trying to understand it. Basically I have a SDC2160 controller connected to an quadrature encoder. I have a limit switch (NC) on digital pin 3. I don't understand what it means to load the home counter. I can get it into the "if" statement and start to move back but then it will freeze and stop moving and I can't regain control until I manually press the limit switch.