![]() ![]() I'm not sure if this is related?Ĭan anyone see a problem / possible see whether I have a mistake in my code above. Now, when I measured the with a potentiometer, I found the voltage at which the ADC pin gives a reading of 1024 is at about 3.5V. 1 Answer Sorted by: 5 You did not give the make of your NodeMCU but as there is no uart.alt on ESP32 I guess 8266 So if your NodeMCU is an ESP8266 there is a problem with your setup: From the ESP8266 documenation: Although there are two UARTs (0 and 1) available to NodeMCU, UART 1 is not capable of receiving data and is therefore transmit only. Here is my code for getting the temperature: float getTemperature() I'm getting temperatures about 5 degrees higher than I would expect. So, given that I've scaled the voltage, I'd have to scale the 10 mV/C to 10 * 100/320 mV/C, right? And the temperature reading should be V_adc * 1000 / (10 * 100 / 320) The LM35 datasheet says that the temperature changes by 1 deg C for each 10 mV. Through the board manager, new boards (essentially software-based components required for the Arduino IDE to be able to upload code to a particular. So, if we have a V_out = 0.2V, the V_adc = 0.0625. To make it easier to integrate other open source boards with the Arduino IDE, the Arduino team included a board manager in recent IDEs. ![]() I realise now that the voltage out (V_out) from the lm35 is not that arriving at the ADC pin on the esp, but rather V_adc = V_out * 100/320 (given the voltage divider). I'm trying to get an lm35 (temperature sensor) to work with the analog pin on the nodemcu 1.0. I'll continue in this thread with my follow up question: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |