python 3 library typos

General discussion of using Roboclaw motor controllers
Post Reply
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: python 3 library typos

Post by Basicmicro Support »

I'll need to know which example you used? I went through all the exmaples we include with the python library and I dont see that typo. If you are using examples in the manual, those are getting far out of date. We are removing them for the next release and all examples will only be included with the library itself from then on.

As for the second problem, comport is NOT the same as _port. the comport argument is just the comport NAME. It is used in the Open() function which opens that comport and creates a comport object which is _port. I recommend you start from scratch and re-download the library so no edits you made could cause you future headaches.

Note the examples are simplified with very little error handling. One thing you may want to do is check the return value from the Open() function. If it returns 0 then your comport could not be opened. This could be because it does not exist or because something else already has taken control of that port.
Basicmicro Tech
Posts: 13
Joined: Wed Feb 13, 2019 2:56 pm
Re: python 3 library typos

Post by Basicmicro Tech »

This article: https://resources.basicmicro.com/using- ... n-library/ had a typo in the import statement that you caught. The "c" is lower-case "from roboclaw import Roboclaw". Thanks for catching that.

Post Reply