I have five accelrometer sensors (MMA 7361) connected to the analog channels of Arduino Duemilanove. I am using the following code to read the data. (I am reading from only one axis from each sensor.)
#include <avr/io.h>
#include <avr/wdt.h>
int sensorValue = 0; // value read from the pot
void setup()
{
Serial.begin(9600); // initialize serial communications at 9600 bps:
}
void loop()
{
// read the analog values:
int i=1;
Serial.print("ACS#");
for(i=0;i<5;i++)
{
sensorValue = analogRead(i);
Serial.print(sensorValue);
Serial.print("#");
delay(10);
}
Serial.println("");
}
I am using a delay of 10 after reading each sensor. What should the value of the delay I should be using after reading one sensor to get the correct values from the sensors?