Piu! Voice Assisted Gamepad
Introduction: Piu! Voice Assisted Gamepad
The voice assisted gamepad is a home automation project I made for my four year old girl <PERSON>, who has lately taken interest in playing space invaders on my retropi setup. I basically taped a servo motor to the fire button and connected it to an Arduino which kept monitoring a microphone, and coded some basic logic to trigger the servo just enough to press the button whenever a sound is heard. As you can see in the clip, we initially tried "piu" as the trigger keyword, but later found out that it was a bit too long and triggered the servo twice, but maybe that's a boon, I don't know. Anyway I will attach the code and you can play with the threshold, timing etc. as you like.
Throughout this short tutorial I will not get into the details of how to upload code to Arduino for the first time, if this is your first arduino project, there are plenty of good guides out there, here's one:
https://learn.adafruit.com/ladyadas-learn-arduino-...
Also, if you are a first timer, I would recommend using the Arduino Uno rather then the Nano due to driver related details. 1003
In the tools & supplies section I will describe the two options
Step 1: Tools & Supplies
Tools:
Utility knife
Scissors
USB Power source (charger, usb battery, laptop etc.)
Rertopie with standard game pads
(or any kind of gaming platform that has a controller with a button/pad that can be triggered vertically)
Supplies:
Option 1 (nube-friendly, Uno based):
Arduino Uno
https://he.aliexpress.com/item/1005001621969027.ht...
Sensor Shield for Uno
https://he.aliexpress.com/item/32552605782.html
Option 2:(Nano based)
Arduino Nano
https://he.aliexpress.com/item/1005001711279154.ht...
Sensor Shield for Nano
https://he.aliexpress.com/item/1005001580331597.ht...
[From now on, shared for both]
A piece of the best double sided tape you can get
my brand is unknown, its inlined with this thread grid like thingie, making it stronger structurally I guess
(I've put an image with a shred of the original logo of a rhino, I think - if you recognize it do leave a comment, it's pretty great)
Micro Servo Motor:
https://he.aliexpress.com/item/<PHONE_NUMBER>.html
(any kind will do really - still I cannot recommend metal gear enough, they are so much better then 50c cheaper plastic gear)
30cm piece of stiff, single core copper wire, 1.5-2mm thick, insulated
https://he.aliexpress.com/item/4000602576909.html
Amplified Microphone Module
https://he.aliexpress.com/item/4000587195920.html
Dupont female-female headers
https://www.aliexpress.com/item/4000203371860.html
Dupont header shells for making cable pretty pretty (optional, that is)
https://he.aliexpress.com/item/<PHONE_NUMBER>.html
and a bunch of small zip ties, also for best looks & grooming
https://he.aliexpress.com/item/33005495060.html
Step 2: Hooking Up the Arduino
All components eventually get connected to one another via the sensor shield. The next section will describe these connections step by step.
Start by placing the Arduino into the Sensor shield, if using a Nano, or connecting the Sensor shield atop the Arduino, if using an Uno. From this point on, there will be no difference between the two setups.
Connect the Servo cable to digital pin nine, making sure the brown wire gets attached to the G avenue.
Take 3 Dupont wires and connect them to pin A0's triplet on the sensor shield. watch the colors, because you will need to connect the microphone to the other end. schema goes:
Microphone End | Sensor Shield End
A0 S
G G
+ V
I've attached a diagram to show this more graphically.
Do take your time and pay attention to the way you connect the two(microphone -> sensor shield). Here, a wiring mistake might cause the module to fry. 611