top of page

Software

Public·132 members

Driving bittle from Raspberry PI

Hi folks,


I got the raspberry pi connector on top of bittle, set up and everything works. I can send commands to from python, and Bittle mostly does them. Now, a few problems:


- the interface from Python is extremely coarse - you can give commands and some time (in seconds), but a better one would be "run x instances of the loop". Is that not available yet, or did I miss it?

- the communication is also very error-prone. I get into modes where the skills don't work, but things like turn off/balance do. How do I know the status of the channel, and is there a way to reset it without a more general reset?


Generally though, should I be investing in the serial communication, or should I start looking into i2c (and flip that switch) which I presume means driving the servos directly?


If this question is answered/portable from a different Petoi platform, I can crib from there, just point me to it please - couldn't find it on my own.


Thanks,

Bear.


PS: posting to the forum seems broken, the "select your post category" can't select any option, so "publish" is grayed out.

449 Views
Knut Bear
Jul 20, 2021

If you give me a bit I'll upload a newer version that's a bit cleaner/supports more things. You can also set up web streaming so you can make a little remote controlled camera.


You wanna roughly do the following:

  1. get your bittle working/calibrated with the regular serial module. should be in the instructions/videos that come with the kit.

  2. solder in the raspberry pi connector. I'm using a zero w and it's enough horsepower

  3. get a camera but note if you're using pi zero you need the special cable that's smaller at one end.

  4. on raspberry pi, install git (you can find instructions)

  5. clone the opencat repository

  6. drop the code above in the serialMaster directory

  7. install some video streaming - I found this works pretty well

  8. keep a terminal open to the raspberry pi and run the python program that reads the keys

  9. watch it on the browser

There's a slight delay (under a sec) but I navigated around the couch from another room, etc. Pretty neat. Not at all stealth.


You can also buy a battery holder and some beefy batteries that will last you hours, but it's a bit more involved project to add a connector - I found that bittle is powerful enough to lug them around, and you can velcro/rubber band them to the underside in place of the original battery, easily.


The steps above assume a lot of stuff - like you know how to set a raspberry pi, etc. so depending on your knowledge you'll have to chase down a bunch of other instructions, let me know if you need more help.

bottom of page