Go Down

Topic: SerialPrint colums (Read 310 times) previous topic - next topic

robotkid249

Hey, i have a binch of ldr's hooked up to arduino's input pins 0-4. I want arduino to read the 4 sensors and print them. The real thing i want to is print each sensors data in a seperate colum. For example, Sensor 1 all the way to the left; sensor 2's data in the middles left; sensor 3's data in the middle to the right; then sensor 4's data all the way to the right. Please help me with this; maybe some code. Thanks!

trialex

I'm sure there's a much more elegant way, but I'd start with

Code: [Select]

Serial.print("Sensor 1 = ");
Serial.print(sensor1_val);
Serial.print("              Sensor 2 = ");
Serial.print(sensor2_val);
Serial.print("              Sensor 3 = ");
Serial.print(sensor3_val);
Serial.print("              Sensor 4 = ");
Serial.println(sensor4_val);

Go Up