Это видео недоступно.
Сожалеем об этом.
Analog Temperature Sensor with Arduino
HTML-код
- Опубликовано: 16 авг 2024
- Find code and diagrams at: www.EliTheComp...
You can use Analog Temperature Sensors in Arduino Projects to determine the temperature in your environment.
Functional Parts in the Project:
Arduino Uno - store.arduino....
Breadboard Kit - amzn.to/2Xih5ei
Analog Temperature Sensor - amzn.to/2Rkkl3k
#define sensorPin A0
void setup()
{
Serial.begin(9600);
}
void loop()
{
int reading = analogRead(sensorPin);
float voltage = reading * 5.0;
voltage /= 1024.0;
float temperatureC = (voltage - 0.5) * 100 ;
float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
Serial.print(voltage); Serial.print(" volts - ");
Serial.print(temperatureC); Serial.print(" degrees C - ");
Serial.print(temperatureF); Serial.println(" degrees F");
delay(3000);
}
Eli helped me 6 years ago get a developer job without a degree, now he is helping me get into IoT. Thanks man!
I fall in love with the method of your teaching. You are the shining star.
Eli you are beyond awesome! You make life in an extremely complex tech world seem simple & make sense of everything. Thank you for what you contribute to our tech world and it's evolution.
the pull up resistor is missing. What I noticed is the middle pin of the temperature sensor needs a pull up with a resistor in between preferably of 4.7KOhm resistor. this is needed to get correct temperature readings.
Good to see Eli back.
Did this and it worked!!!!!!! THANK YOU ALOT!!
Hi. I don't knownif you are still checking this channel but I was wondering if I can pay you to program a ds1821 analog to digital sensor. I have a infrared sauna with damaged sensor. My buddy thought it was a reset button so he pressed it so hard that it broke. I bought a new temp sensor and thought it was just plug and play but after many failed attempted I finally found the reason. Your channel explain really well but I am not very technical. All I can do is solder the sensor. Please let me know if you can. I will compensate you for your time. Thank you
My is displaying like 200 degrees. What do I do?
... probably a bad sensor... if you reverse wire them you usually kill them... that's why you buy them 5 at a time...
@@elithecomputerguy alright thank you