Page 1 of 1

How to Home Motor Using Arduino Library and Limit Switch

Posted: Thu Mar 18, 2021 3:22 pm
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

Re: How to Home Motor Using Arduino Library and Limit Switch

Posted: Tue Mar 30, 2021 10:52 am
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.