Sound Detection Module with Raspberry Pi

Sound Detection Module with Raspberry Pi

Introduction

In this tutorial, you will learn how to connect a sound sensor to your Raspberry Pi’s GPIO pin and make it detect sound using Python.

Required Hardware



Wiring

Connect the sound sensor to your Raspberry Pi as shown in the diagram below:

Code

On your Raspberry Pi, open a terminal window. Install python by the following commands:

sudo apt-get update
sudo apt-get install -y python-dev python-rpi.gpio

Download and save this file to your desktop

With the following commands you can execute the Python script that displays the distance:

cd Desktop
python sound.py

The script will detect sound every time. Press Ctrl + C to terminate the execution of the Python script.



Images & Screenshots



3 Responses

  1. Hiya very cool web site!! Man .. Beautiful ..
    Superb .. I will bookmark your website and take the feeds additionally?
    I’m satisfied to search out a lot of useful information here in the put up, we need develop extra strategies on this regard, thanks for sharing.

  2. Suyash Mittal says:

    Should make it look better.

  3. I do agree with all the ideas you have introduced on your post.
    They are very convincing and will certainly work. Still, the posts are very quick for novices.
    May you please extend them a bit from next time?
    Thank you for the post.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright ©️ 2018 Naman Tech Labs. All Rights Reserved. Logo by Suyash Mittal