Grove starter kit for arduino --- Sound sensor

Grove starter kit for arduino --- Sound sensor © LGPL

Teaches you how to use the sound sensor in the Arduino Grove starter kit.

  • 783 views
  • 0 comments
  • 4 respects

Components and supplies

Apps and online services

About this project

Setup:

To setup, plug the sound sensor into A0.

Code:

For code all you need to do is analogRead(), but the code included returns a more easily read version.

Note: remember to turn your serial monitor to 115200 baud.

Code

sound sensing codeArduino
const int pinAdc = A0;

void setup(){
    Serial.begin(115200);
    //Serial.println("Grove - Sound Sensor Test...");
}

void loop(){
    long sum = 0;
    for(int i=0; i<32; i++){
        sum += analogRead(pinAdc);
    }

    sum >>= 5;

    Serial.println(sum);
    delay(10);
}

Schematics

connection_NcmaemHSVC.jpg
Connection ncmaemhsvc

Comments

Similar projects you might like

Grove Starter Kit for Arduino: Touch sensor

by Grant

  • 1,076 views
  • 1 comment
  • 2 respects

Grove Starter Kit For Arduino --- RGB LCD

by Grant

  • 7,857 views
  • 2 comments
  • 10 respects
Add projectSign up / Login