How to Home Motor Using Arduino Library and Limit Switch

Questions about using encoders with the Roboclaw product line
Post Reply
maov
Posts: 2
Joined: Thu Mar 18, 2021 3:12 pm
How to Home Motor Using Arduino Library and Limit Switch

Post by maov »

Hi,

I'm using a roboclaw solo for my project and I want to use an Arduino to control the motor. I know how to do it using the Motion Studio but I can't find a function to do it on the Arduino. My objective is to use the limit switch to call something home.

Thanks
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: How to Home Motor Using Arduino Library and Limit Switch

Post by Basicmicro Support »

To home in an arduino, you set the limit switch to home(user) mode. Then at the beginning of your arduino program you check the limit switch status and it if is set(at home) move the motor forward until the limit switch status is cleared. Then whether the motor was original in the limit or now, you now move the motor backwards until the limit switch triggers again.

Post Reply