Combining the power of Littlebits with Augmented Reality, this project creates a head moving talking Augmented Reality Robot. With the use of 2 servos, I can make the box head move, the Augmented Reality app makes him talk and blinks. His eyes controls movement of his head. I added Littlebits Arduino connected to Raspberry Pi to communicate with Augmented Reality Phone app. If he looks up, his head moves up, if he looks left/right, his head follows. This is exciting because I just made a robot that randomly controls itself by moving his eyes. Amazing!
He talks too!
If this project made you interested in learning Augmented Reality or Connecting Arduino with Raspberry Pi, please add respect and follow me.
HOW TO MAKE ITSTEP 1 : Put 2 Servos togetherI used a hot glue gun to put two servos on top of each other. One rotating left and right, the other rotating up and down. After that, cut a piece of cardboard and fold it to make a box. I created a QR code for the Augmented Reality app, but you can draw a face on a piece of paper.
STEP 2 : Connect servos to 2 slide dimmer bit and forkIn order to control the servos, I connected them to a slide dimmer. This will enable us to turn the head left or right, up or down. Now you have a simple animatronic puppet head. My little kids enjoyed playing this!
STEP 3 : Replace the Slide Dimmer Bit with an Arduino BitI wanted make this Bot move autonomously. Add a little brain, so I connected it to an Arduino Bit. Arduino is good way to control the Head, but I wanted to make it where I can remotely control the head. So I decided to look into connecting Arduino to Raspberry Pi.
Since Raspberry Pi can connect to a wifi and it has USB ports, I can connect the USB plug of the Arduino to Raspberry Pi.I found an article just what I need
https://www.raspberrypi.org/magpi-issues/MagPi07.pdf
you can attach arduino in raspberry pi by installing
$ sudo aptget install arduino
It will create an icon in the Raspberry Pi Desktop and create your programs there. After that, I wanted to use NodeJS to communicate to Arduino. I use CylonJS to communicate with Arduino on raspberry pi. CylonJS has a way to generate a web server for your robots. I want to use NodeJS because I can create a web server in Raspberry Pi and communicate to Arduino too. Here's the link to the github repo
https://github.com/rondagdag/boxhead
STEP 4 : Create an Augmented Reality AppI used Unity3d to create an Augmented Reality App.
I used the sample app from SALSA With RandomEyes
https://www.assetstore.unity3d.com/en/#!/content/16944
here's a sample of what it can do. I followed the instructions here.
I used the 3D_Public_Functions_CSharp scene as base for this program.Then I made the Augmented Reality app, I followed instructions from this youtube video
I attached boxHead GameObject to an Image Target, I used the QR Code as the target
In order for his eyes to control the head, I wired the CM_RandomEyesBroadcastEventTester.cs and CylonCoroutine.cs
https://gist.github.com/rondagdag/94260118a8d0b3e862d0
https://gist.github.com/rondagdag/b545bb76c4ed3615fed9
I added both code to _GameManager Object
This will make his head move when eyes look up/down/left/right. I does not move if the eyes move to upper left/right, lower left/right.
If this project made you interested in learning Augmented Reality or Connecting Arduino with Raspberry Pi, please add respect and follow me. Thanks.
Comments
Please log in or sign up to comment.