Go Down

Topic: SerialPrint colums (Read 323 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy