mBot plus: artificial vision via Raspberry Pi

Hi there! After my reviews on the mBot (UnboxingAssembly, and Programming the robot), and having a Raspberry Pi capable of controlling servos, and a webcam, what can I do?

Well put everything together and try to make a robot with artificial vision. Easy isn´t it? Well, it´s not so easy. Making a robot to see is still something hard, but, to which extent? It´s one of the things I what to learn here. This is a proff of concept, so don´t expect a very fashion robot here, but some practical experience about it ;-)

Here is what I have mounted right now:



For the moment I have:


  • mBot fully funtional and able to communicate in several ways,
  • a Raspberry Pi with a Hatalogico hat capable of controlling servos and communicating,
  • a standard webcam,
  • already having VNC working in Raspberry Pi, so I can handle it from my laptop without external screen,
  • webcam can send images to my PC via motion (see picture). Thanks to motion software. See below.
  • basic knowledge on Python, Linux and time to experiment...





So my next movements are:

  • add artificial vision to the raspberry Pi, basic first,
  • communicate raspberry Pi with mBot to send commands and share info,
  • emulate some intelligence in the whole robot so it can navigate alone to perform basic tasks.
  • an interesting idea is if it could recharge itself as it operates with rechargable 5V batteries (looking for "food"?).
  • Extra point: mBot has extra-parts as kits so it can grow, so my whole robot will do.

I don´t know at the moment how to do any of these objectives, but LMR and Internet is plenty of this info so I´ll gather it and develp the robot step by step.

Update 9th September 2015.

How to get images from an USB webcam with your Raspberry Pi? Easy! I found this documentation, followed it and voilá! I have nearly real-time images from my webcam wireless (or wired depending on the Raspberry Pi connection) to my web browser, in my PC or mobile phone!

To see the images in my web browser I just need the IP of my Rasperry Pi. Easy with any program like Advanced IP scanner (remember you can´t run any command in Raspberry Pi as you are not yet connected to it wiresly. You could use also static IP or another cable connection and discover the WiFi IP, but those are easy ways to do it ;-) )

Now I just have to surf to my Raspberry Pi IP address with the webcam port, in my case after the configuration mentioned above it is the 8081 port. So the total address is:

I uploaded a simple video just to show how it works. You can see how I command the robot via remote control, while I record the video in the PC, as it is on streaming via WiFi.

Imagine, you can create a dirty cheap IP-webcam for home, or even to check it remotely accessing it through your router.

In my case it was just to have my robot wandering aroung and getting video back so I can guide it.

At the moment I found it is not a very fast video image, so I have to use a faster one which I found already but it´s harder than I though. As it is an improvement from something already working, I prefer to develop other functions in my robot that I don´t have yet. Perfection comes later. But if you have any suggestion please don´t hesitate to tell me.



This is great Fransico!

I’ll be watching this one. I’m sure as your usual style, it will be documented with great detail.
I’ve got a Pi and have not done much with it.


1 Like