The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

Tutorial STEP BY STEP


(^114) The Official Raspberry Pi Projects Book raspberrypi.org/magpi
EMPATHYBOT:
THE RASPBERRY PI ROBOT
THAT READS EMOTIONS
In this project we’ll build a Raspberry Pi robot with emotional
intelligence using the Raspberry Pi Camera Module to tell if a person is
happy, sad, angry, or surprised
hat if you could build a robot with some
empathy? This tutorial will show you how to
build a robot that can read a person’s face
for emotions. In this tutorial we’ll use the Raspberry
Pi, the Raspberry Pi Camera Module, a GoPiGo, and a
speaker to read some human faces and say something
appropriate back. Our robot will roll up to its human
master, take a picture, analyse the face with a free
Google Cloud Vision account, and then say something
appropriate to the human’s current mood.



STEP-01
Build the GoPiGo
You will need a small Phillips head screwdriver; the
rest of the parts are included with the GoPiGo. There
are written directions and video instructions on the
Dexter Industries site showing how to assemble
the GoPiGo robot kit. Attach the Raspberry Pi, and
add eight AA batteries to power the GoPiGo. While
programming the stationary GoPiGo, you may want
to use a USB power supply to power the Pi.
STEP-02
Add the camera
Add the Raspberry Pi Camera Module to the GoPiGo.
In this tutorial, we’ll use one of the slots on the top of
the GoPiGo canopy to support the camera. You can also
use the servo accessory to move the camera side to side.
STEP-03
Add the speaker
The speaker can be mounted to the top of the GoPiGo
using a few zip ties. Place the speaker on top of the
GoPiGo, and connect the speaker aux cable to the
Raspberry Pi headphone port. You can charge the
speaker using the Raspberry Pi USB cable.
W
JOHN COLE
Travelling bearded nerd with a heart
powered by coffee and an unfocused
mind. 2016 Presidential candidate.
Engineer at Dexter Industries.
dexterindustries.com
GoPiGo kit
magpi.cc/
2hA8f6i
Speaker
magpi.cc/
2hAgCi7
Ultrasonic sensor
magpi.cc/
2hAazds
Button sensor
magpi.cc/
2hAhqE1
Raspberry Pi
Camera Module
magpi.cc/
28IjIsz
You’ll
Need
The Raspberry Pi Camera
Module takes a picture
of the human subject
The speaker is used to say
some words back from the
robot to the human subject,
depending on their mood


Free download pdf