How to read S4/S5 State

General discussion of using Roboclaw motor controllers
Post Reply
spencerbarrett
Posts: 2
Joined: Wed Jan 25, 2017 2:29 pm
How to read S4/S5 State

Post by spencerbarrett »

I need to know if my stage has moved onto a limit switch - how do I get the status?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: How to read S4/S5 State

Post by Basicmicro Support »

You need to set the S4/S5 pins up to be limit switches if you havent already. Then you can see there state by reading the status word. They are the 2 high bits in the word(eg they are also the home flags). Note that as limit switches they will also stop the particluar motor which triggered the switch(falling edge).

Post Reply