so i have my ardunio attached to my RPi and have a sketch running with a temp sensor that gives voltage, sensor value and degree c. what i want is to have those numbers in different columns.
i would like to remove Serial.print("Sensor value: "); Serial.print(", Volts: "); Serial.print(", degrees C: ");
so just the numbers appear, but when i remove them i get a crazy number.
I am still NOOB so please be nice! thanks!
here is the code
const int sensorPin = A0;
const float baselineTemp = 18.36;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("Sensor Value, Volts, temperature");
}
void loop() {
// put your main code here, to run repeatedly:
int sensorVal = analogRead(sensorPin);
Serial.print("Sensor value: ");
Serial.print(sensorVal);
float voltage = (sensorVal/1024.0) * 5.0;
Serial.print(", Volts: ");
Serial.print(voltage);
Serial.print(", degrees C: ");
float temperature = (voltage - .5) * 100;
Serial.println(temperature);
delay(10000);
}