In this project, we will use Raspberry pi to drive sound sensor. If sound sensor detects sound, it will send 0 (low voltage) to Pi and light up LED. The sensitivity of the experiment can be adjust by adjust resistor in the back of the sensor

2)Parts and Devices:

1 x Raspberry Pi3 or Pi2

1 x  sound sensor

1 x  RED LED

1 x 1kohm resistor

1 x Solderless Prototype Breadboard

Jumper wires

3)circuit graph


4)Software download and install

Step 1: install git core on Raspberry Pi, if you has already installed git core, skip this step

run following command in Pi terminal.

sudo apt-get install git-core

sudo apt-get update

sudo apt-get upgrade

2)Step 2. Install wiringPi library , if you have installed wiringPi, skip this step

Run following command in pi terminal window.

git clone git://git.drogon.net/wiringPi

cd wiringPi


3)download and compile sound.c

run following commands

wget http://osoyoo.com/driver/sound.c

gcc -Wall -o sound  sound.c  -lwiringPi

sudo  ./sound


When you make noise or speak near sensor, the LED will turn on. Otherwise the LED is off.

type Ctrl C to end the program