im using 8 temperature sensors and i run the following sketch..but im not able to get my result in a column series...that happens only for the first 4 reading...the other 4 comes below one another..CAN SOMEONE HELP ME??
//Declare variables
float tempA;//0
float tempB;//1
float tempC;//2
float tempD;//3
float tempE;//4
float tempF;//5
float tempG;//6
float tempH;//7
int tempAPin = 0;
int tempBPin = 1;
int tempCPin = 2;
int tempDPin = 3;
int tempEPin = 4;
int tempFPin = 5;
int tempGPin = 6;
int tempHPin = 7;// Temp sensor plugged analog pin 0
// Write setup function
void setup ()
{
Serial.begin(9600); //Opens serial port to communicate with temp sensor
Serial.println("t1\t2\t3\t4\t5\t6\t7\t8");
}
// Write loop that will control what we want the arduino to do with the sensor readout
void loop ()
{
tempA = analogRead(tempAPin);
tempA = (5.0tempA100.0)/1024.0;
Serial.print((byte)tempA);
Serial.print("\t" );
tempB = analogRead(tempBPin);
tempB = (5.0tempB100.0)/1024.0;
Serial.print((byte)tempB);
Serial.print("\t" );
tempC = analogRead(tempCPin);
tempC = (5.0tempC100.0)/1024.0;
Serial.print((byte)tempC);
Serial.print("\t" );
tempD = analogRead(tempDPin);
tempD = (5.0tempD100.0)/1024.0;
Serial.print((byte)tempD);
Serial.println("\t");
tempE = analogRead(tempEPin);
tempE = (5.0tempE100.0)/1024.0;
Serial.println((byte)tempE);
Serial.println("\t");
tempF = analogRead(tempFPin);
tempF = (5.0tempF100.0)/1024.0;
Serial.println((byte)tempF);
Serial.println("\t");
tempG = analogRead(tempGPin);
tempG = (5.0tempG100.0)/1024.0;
Serial.println((byte)tempG);
Serial.println("\t");
tempH = analogRead(tempHPin);
tempH = (5.0tempH100.0)/1024.0;
Serial.println((byte)tempH);
Serial.println("\t");
Serial.println(" ");
delay(1000);
}