Grove - Sound Sensor
This project will use a Grove Sound Sensor to turn on a Grove LED when sound in the room is above a threshold value.
- Connect a Grove LED to a grove connector on your board and a Grove Sound Sensor.
- Begin a new Grove project using the Grove Project Import method at the bottom of this page.
- In the Project Explorer on the left, under Sources, double click to open the file "arduinoApp.cpp".
- Copy and paste the following code into this file to replace it's contents:
//--------- Sound Sensor Test #include "arduinoApp.h" #define THRESHOLD_VALUE 800 //The threshold to turn the led on int soundSensorPin = 0; // Sensor connected to this analog pin void setup() void loop() |
- Select Project from the main menu and choose Build Project.
- If there are any errors they will be displayed in the Problems tab.
Now follow the steps under Debugging your ARM Board Project.