Thread safe python interface to brickpi


#1

Hello administrator,
I’ve been working on a thread safe python interface to the brickpi and I think it has now reached sufficient stability and usefulness to share.
What is the best way to do this?
I could put it in my copy of the brickpi repository and send a pull request. However, this is a bit more than just a simple driver example. I guess you will want to thoroughly review the code before pulling it in and you may not have time for that.
Another option is that I create my own repository on github.

What do you prefer?


#2

Hey Frans, awesome! Do you have it anywhere up online that we could take a look at? Github is a great idea; you would be able to share it with more people as well.

Again, that’s really awesome! We can’t wait to take a look!


#3

Hey Frans,

Did you get round to posting your code anywhere? Reason being I’m getting to the stage in my project where I could really do with a thread-safe BrickPi interface and it’d be nice not to have to implement it from the ground up and repeat your work.
Cheers,

Jim


#4

Nevermind, found it :slight_smile:


#5

Hello Jim,
I hope it will be useful for your project. If you have questions or improvements, please let me know. Also you are very welcome to contribute to this code, however it is probably easiest to clone my github brickpi repository and push updates to me first.

Cheers,
Frans


#6

Thanks Frans. It’s proving useful already and a much more intuitive API (for me at least) than the standard BrickPi.py one.
I’m working on a few things that might end up being worth sharing; PID control which would be nice to have in the main interface, along with a synchronized motor controller to keep 2 or more motors in step (like NXT-G’s move and Lejos’ synchronized motors). I also may well end up porting over sensor drivers from NXC or Lejos if they’re not done as and when I come to need them.

Cheers,

Jim