Robotics In Balena

Hi Everyone, I am after some advice on how to get a robot tank into Balena if possible.
I have a TS400 tank chassis with a raspberry pi zero driving an LS298n Motor controller, It also has a quad relay board to launch fireworks from it using e-matches. I have a python script that loads on boot in raspberry os, but would ideally like it in Balena with a 4g dongle so i can drive it round the fields from home :slight_smile:
Sounds crazy but is it even possible.

1 Like

Hi Paul, wow, that is quite a setup! So my first few questions are all about that “driving” aspect.

  • Is there a GUI? How do you currently control this thing? I get that the Tank has a Pi 0 running Raspberry Pi OS, but, you manage / interact with it via your laptop?
  • Does it require anything beyond just the Python scripts? Anything else?

Is that application / code opensource? Is it on GitHub or similar somewhere?

1 Like

Hi David,
There is no GUI as yet, like I say I am new to coding robots all together, let alone build an app for my pc as well.
I have control of the robot currently using SSH and a raspberry pi camera streamed through the browser window. I have yet to integrate it into my code as I am still learning. & yes I have it on Github, cluffmaster/4WD-Tank (github.com)

Even just control through balena would be amazing, camera feed would be the cherry on top.

Glad you like it.

Hey Paul,

Great work so far! Don’t worry about being new to all of this. We’ve all been there, and it’s really great that you’re putting your code on Github and reaching out for help.

So to answer your question: yes it is completely possible to port this to balenaOS.

Firstly, have a look at our PiZero + Python Getting Started Guide. You can use the Github repo linked there, but just replace the code in the main.py file with the contents of your Robot_Tank.py file.

Hope this gets you started.
Phil

Hey @pcolclough how is your tank going? are you succeeding balenifying it?

Let us know more!

Hi Marc,

I have been a little busy with work, but have actually built a smaller one so I don`t mess with what I have already built. It has taken me a while to get this far.
So what I have built is a dual motor tank with simpler design to get to the grips of it.
Will keep you posted as i think it would be great to get working in the end.
Sorry I am a bit slow getting back as I am so new to all this.

1 Like

Hello @pcolclough good to hear that you get something working! no worries about the speed at all!

Looking forward to see videos or pictures of what you are doing.

And let us know if we can help you with anything!