0% found this document useful (0 votes)
27 views1 page

Arduino Interfacing With Phidgets Sound Sensor

This Arduino code uses a Phidgets Sound Sensor connected to analog pin A0. In setup, it begins the serial connection and initializes the average variable. In loop, it takes the average of the current and previous analog readings from the sensor pin, prints this value to the serial monitor, and adds a small delay before repeating.

Uploaded by

goutamkrsahoo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Arduino Interfacing With Phidgets Sound Sensor

This Arduino code uses a Phidgets Sound Sensor connected to analog pin A0. In setup, it begins the serial connection and initializes the average variable. In loop, it takes the average of the current and previous analog readings from the sensor pin, prints this value to the serial monitor, and adds a small delay before repeating.

Uploaded by

goutamkrsahoo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Arduino Interfacing with Phidgets Sound Sensor

Code:
#define sensorPin A0

int average = 0;

void setup(){
Serial.begin(115200);
average = analogRead(sensorPin);
}

void loop(){
average = (average + analogRead(sensorPin)) / 2;
Serial.println(average);
delay(10);
}

You might also like