Main Content

MyPetBot (A Bot That Follows You)

Ai is one of the most beautiful application of mathematics. It’s basically a bunch of matrices operations optimized to match the result you are looking for. Luckily there are tons of open source tool that allow us to make use of it.
I originally had the idea long time ago when I was working on a waterfall de-activated by the people passing throw. I was using ultrasound sensors and discovered too late that they don’t work greatly when they are wet… That was not a fun experience. We ended up using a big button that people would press if they wanted to pass. It turned out fine because it was hot and people loved getting wet, but the problem stayed in my head… How to detect people and activate a reaction.
Im telling this story because I want to point out that this principle can be used for tons of other applications! Following your face with a toy is only one of them. For interactive installations you could do any kind of thing. You could use a model to detect if a face is smiling. You could count the number of dogs in a park. You could close your blinds when people are passing by. Or… make a controller for your nintendo base on your body position…. You can download many other Ai models that do any kind of stuff.
There are a few tutorial on how to make Ai inference work with raspberry pi. I am here to teach you how to make the hole integration into a self working unit. As soon as your robot boot, it will start the necessary programs.

Supplies:
Parallax robot: I chose this robot because I had it laying around, but any robot that can be controlled with an arduino will do the work.
Raspberry pi: I recommend at least the raspberry pi 3B+.
Intel Neural Stick: The inference rate goes from one per sec to 8. You really need one if you want to do Ai in a raspberry pi.
Power Bank: Easiest way to manage the power. Works with the raspberry pi 3B+, you might want to check it works with a pi 4.
Picamera: I like using the picamera instead of an usb.”

Link to article

Related Content