[bright rising chimes]
- [Narrator] For those of
you who've followed ARS
for a while, you'll remember this guy.
This is the Teddy Ruxpin we
used in our BearDuino project,
a hacked Teddy Ruxpin that's been gutted
of its original equipment
and has these control wires
from its servo spliced
into this Arduino Uno.
The yellow here goes into pin nine
on the digital side of the Arduino.
That's the servo control
that we've configured
in the sketch running on the Arduino.
And here we've got power and ground
patched in to the analog side.
Bear Alexa is running
on a Python application
that I pulled down from
a project called AlexaPi.
The AlexaPi application is a Python app
that was built by a number of people
who have been doing
Python-based Alexa projects
on the Raspberry Pi and other platforms.
And I simply added a bit of serial code
to that application on a Raspberry Pi
to send on and off
signals for the animation
of the bear via the Arduino.
On the Arduino, I've built a new sketch
that uses an animation sequence
that is triggered by a serial command
coming over the USB port
from a Raspberry Pi.
On the original project, we were using
an application running in Windows
that sent text to the Arduino
over serial connection,
and the sketch that was
running on the Arduino
interpreted the text into servo positions
for the single servo running
inside Teddy Ruxpin's head
to move the eyes and mouth.
This is our Raspberry Pi 2
that's powering this project.
We have a USB microphone plugged into it
to receive audio commands.
It's plugged into hard wire ethernet,
and this is the USB going to the Arduino
and saying serial commands
to drive the animation.
This time around, we've
replaced the sketch
with a new one that has
built-in animation sequences,
since we're parsing for a wave file
that I can't get the contents of
to animate the mouth while audio plays.
The sketch code is on the site,
and it's also on a
GitHub for this project.
Alexa.
- Yes?
- [Narrator] What time is it?
- It's nine oh nine a.m.
- [Narrator] We're using USB
for our serial connection.
Ideally, I'd like to be using
GPIO off of the Raspberry Pi,
but I haven't gotten around
to soldering a connection
across between the two of
them with a converter yet.
So there's an occasional instability
with the serial connection, and also,
because I'm using the
Arduino with the USB port
and the code I'm using calls
a serial port on startup,
it's not working very well launching
as a game and it crashes.
So, I've gotta run it
from the command line.
So for now, I have to have
a screen to boot it up.
Ideally, with a few tweaks,
and I'm sure that plenty of people at home
can come up with better ones,
I'll be able to get this to run headless.
Lip sync is not what it could be,
primarily because
there's no way to really,
in software, drive when the bear talks
and when the bear doesn't.
That's because we're getting
events from the cloud
indicating when audio is playing
and when audio is not playing,
when there is actual speech
going on and when there is not.
So for example, when I stream something
like one of the flash briefings
that Alexa does, Alexa?
- Yes?
- [Narrator] What's the weather today?
- Right now, in Baltimore,
it's 58 degrees with rain.
- [Narrator] Alexa?
- Yes?
- [Narrator] Open the pod bay doors.
- I'm sorry, Dave, I'm
afraid I can't do that.
I'm not Hal, and we're not in space.
[jaunty chiming music]
There is one event happening right now.
- [Narrator] Alexa?
- Yes?
- [Narrator] What is the air
speed of an unladen swallow?
- That depends if it's an
African or a European swallow.
- [Narrator] Alexa?
- Yes.
- [Narrator] Open random
song lyrics and sing a song.
- If you like pina coladas and
getting caught in the rain.
Do you want to hear more?
- [Narrator] Yes.
[ending chimes]
