How to use the Taco option on the PicoBorg Reverse board?
Forums:
Hi,
Can you explain how to use the Taco option?
I would like to use this function in order to stop a motor when a limit sensor is active.
Thank you.
Emmanuel
- Log in to post comments

piborg
Sun, 05/04/2014 - 18:26
Permalink
Taco inputs
The taco inputs are normally used to get the PicoBorg Reverse to move a motor for a set distance.
It works by having a signal which swaps between high and low a given number of times per wheel rotation.
When the feedback mode is enabled
PBR.SetEncoderMoveMode(True)
the board starts counting each change.To then move a motor for a given distance the speed is set using
PBR.SetEncoderSpeed(power)
and the motor is then told how many of these changes to continue to move for before stopping usingPBR.EncoderMoveMotor1(counts)
for either or both motors.Normally we would use the EPO connector as a limit switch input, however we can make use of the fact that you can change the speed of the motor after setting a number of counts (taco line changes) to make it behave as a stop signal.
Below is an example of doing this for Motor 1 and getting the code to see it has hit the limit signal:
Bear in mind this assumes that the limit sensor is in the non-tripped state when the script is started, this is because it waits for a change instead of a high or low.