Spartan_001
Member
Hello there,
I'm trying to implement LM35CAZ on teensy 3.2.
i attach the configuration on this thread, and the code i am been using.
https://imgur.com/a/2itS20M
The problem is that i don't know why the measuraments are wrong the values are like 30 ºC and this is
definitely wrong.
If you can help me with this issue i'll appreciate it.
CODE:
float tempC;
int pinLM35 = 15; // i have been using pin 15 for measurements
void setup() {
Serial.begin(38400);
analogReference(INTERNAL); // ¿Is The reference 1.2 V?
}
void loop() {
tempC = analogRead(pinLM35);
// Calculating temperature
tempC = (1.2 * tempC * 100.0)/1024.0;
Serial.print(tempC);
Serial.print("\n");
delay(1000);
}
I'm trying to implement LM35CAZ on teensy 3.2.
i attach the configuration on this thread, and the code i am been using.
https://imgur.com/a/2itS20M
The problem is that i don't know why the measuraments are wrong the values are like 30 ºC and this is
definitely wrong.
If you can help me with this issue i'll appreciate it.
CODE:
float tempC;
int pinLM35 = 15; // i have been using pin 15 for measurements
void setup() {
Serial.begin(38400);
analogReference(INTERNAL); // ¿Is The reference 1.2 V?
}
void loop() {
tempC = analogRead(pinLM35);
// Calculating temperature
tempC = (1.2 * tempC * 100.0)/1024.0;
Serial.print(tempC);
Serial.print("\n");
delay(1000);
}