int superSnooper = 0; // select the input pin for the Super Snooper int superSnooper2 = 1; int superSnooper3 = 2; int ledPin = 13; // select the pin for the LED int val = 0; // variable to store the value coming from the sensor int val2 = 0; int val3 = 0; /*long smoothValue = 0;// to smoothen out analog value long smoothValue2 = 0; long smoothValue3 = 0; */ void setup() { pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT pinMode(superSnooper, INPUT); // reads analog value for speaker pinMode(superSnooper2, INPUT); pinMode(superSnooper3, INPUT); Serial.begin(9600); // opens serial port, sets data rate to 9600 bps } void loop() { digitalWrite(ledPin, HIGH); // sets the LED off val = analogRead(superSnooper/4); // read the value from the sensor val2 = analogRead(superSnooper2/4); val3 = analogRead(superSnooper3/4); Serial.print("A\t"); // Serial.print(val, DEC); // print as an ASCII-encoded decimal Serial.print(10, BYTE);// terminating character Serial.print("B\t"); Serial.print(val2, DEC); Serial.print(10, BYTE); Serial.print("C\t"); Serial.print(val3, DEC); Serial.print(10, BYTE); //delay(20); delay(10); smoothValue = 0; for(int i = 0; i < 10; i++){ smoothValue += analogRead(superSnooper); //delayMillisecond() } smoothValue2 = 0; for(int i = 0; i < 10; i++){ smoothValue2 += analogRead(superSnooper2); //delayMillisecond() } smoothValue3 = 0; for(int i = 0; i < 10; i++){ smoothValue3 += analogRead(superSnooper3); //delayMillisecond() } smoothValue = smoothValue/10; smoothValue2 = smoothValue2/10; smoothValue3 = smoothValue3/10; }