Skip to main content
Arduino

Return to Question

add code language
Source Link
Avamander
  • 624
  • 2
  • 11
  • 35

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

EDIT: I get values like these € Œ

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

EDIT: I get values like these € Œ

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

EDIT: I get values like these € Œ

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}
float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

EDIT: I get values like these € Œ

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

EDIT: I get values like these € Œ

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

EDIT: I get values like these € Œ

added 44 characters in body
Source Link

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

EDIT: I get values like these € Œ

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

I have moved the MCU of the Arduino to a breadboard using these steps https://www.arduino.cc/en/Main/Standalone then interfaced it with an LM35 temperature sensor to the ADC0. But I can't get proper values from the LM35. I think it's because of the Aref or AVcc. Both are just connected to +5? Here is my code:

float tempC;
float reading;
void setup()
{
 Serial.begin(9600);
}
void loop()
{
reading = analogRead(0);
tempC = (reading * 0.4882815) + 5;
Serial.print(tempC);
delay(1000);
}

I get hex values and sometime high values. What to do with Aref and AVcc?

EDIT: I get values like these € Œ

Source Link
Loading
lang-cpp

AltStyle によって変換されたページ (->オリジナル) /