The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

raspberrypi.org/magpi The Official Raspberry Pi Projects Book 71


WAVES Projects


>STEP-01
Press a button
Four push-buttons – one for each question –
are placed on a breadboard and connected to the
Raspberry Pi’s GPIO pins. The user holds down
a button while recording their response.

>STEP-02
Box and printer
The Pi and buttons are placed inside a cardboard
box, spray-painted black, along with a tiny thermal
printer bought from Adafruit (magpi.cc/2up57jH)


  • any similar model will do.


>STEP-03
Colour coding
The four questions are printed on cards with coloured
stickers matching the ones next to the push buttons
on the device. A cool-looking Blue USB mic records
the user’s voice.

PRINT OUT


YOUR VOICE


and later learned that Raspberry Pi
would work well for the project.”
Meeting for weekly sessions,
it took the trio two to three
months to create the finished
project. “We encountered a fair
number of problems during every
work session, but we managed
to overcome them by the end,”
reveals Matt.
“Having a couple of ground
rules set from the beginning really
helped,” reckons Eunice. “For


instance, we decided to always meet
once a week and to commit to a
project that would take less than ten
hours to build. This kept the project
lightweight, fun and stress-free.”
“For me, the best part of this
project was getting to work with
Eunice and Matt,” says Bomani.
“We had a lot of laughs during
our sessions.”
“We all brought different skills to
the table, but a mutual excitement
for Waves and what it could be,”
adds Eunice.
After brainstorming ideas for
open-ended questions for users
of Waves to answer, the team
narrowed them down to the final
four. “We wanted the questions to
be personal and reflective,” explains
Eunice. “That way, receiving a print


Images: Matt Zheng

of the sound waves would mean
more to the participant.”
A Python script converts the
recording of the user’s answer into
a graphical waveform to print.
“The programming wasn’t too
tricky, since we borrowed a lot
from open-source Python code,”
says Matt. “The plots take up the
same amount of paper, no matter
how long the recording is, but
we have to manually adjust the
volume on the microphone, to

make sure that the audio doesn’t
blow out or disappear entirely.”
The result can also be uploaded
to a locally hosted website, which
was displayed on a monitor during
an annual Design Expo at the
university. “The idea for the website
was that people could see other
people’s sound waves and wonder
what was said,” says Eunice. “It was
a really fun addition that turned
some heads and made people
interested in what our project was.”
Eunice was delighted with the
overall reaction to Waves: “It
was really great to see people’s
faces light up when they finished
recording and saw their sound waves
being printed. [...] The best part was
being able to give that to the user
and say, ‘You can keep it!’.”

We all brought different skills to


the table, but a mutual excitement


for Waves and what it could be


Image: Matt Zheng
Free download pdf