Python Get a value when limit switch is reached

General discussion of using Roboclaw motor controllers
Post Reply
sbaake
Posts: 2
Joined: Tue Aug 27, 2019 5:08 am

Python Get a value when limit switch is reached

Post by sbaake » Tue Aug 27, 2019 5:16 am

I have a problem with detecting if my limit switch is reached. I'm using the python library roboclaw.py.
The error led goes red when my limit switches are reached but when i use the ReadError command I don't get a useful value. The value is all the time (0,0) whether the claw moves or reached its final position.

Is there an other way to check if the limit switch is reached? I read the documentation and thought it should work with reading the error state.

User avatar
Basicmicro Support
Posts: 1272
Joined: Thu Feb 26, 2015 9:45 pm

Re: Python Get a value when limit switch is reached

Post by Basicmicro Support » Tue Aug 27, 2019 9:56 am

1. Make sure you have the latest python library from the site. I recommend downloading it again.
2. Please show a simple example program that exhibits the problem so I can check your code and run the example myself.

sbaake
Posts: 2
Joined: Tue Aug 27, 2019 5:08 am

Re: Python Get a value when limit switch is reached

Post by sbaake » Mon Sep 02, 2019 2:15 am

Thank you. The simple issue was that the used version of the roboclaw.py was an old one and an update solved the problem.

Post Reply