EasyManuals Logo

SunFounder ESP32 User Manual

Default Icon
771 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #397 background imageLoading...
Page #397 background image
SunFounder ESP32 Starter Kit
exp is the abbreviation of exponential, and the base number e is a natural number and equals 2.7
approximately.
Convert this formula TK=1/(ln(RT/RN)/B+1/TN) to get Kelvin temperature that minus 273.15 equals
degree Celsius.
This relation is an empirical formula. It is accurate only when the temperature and resistance are within
the effective range.
Learn More
You can also display the calculated Celsius and Fahrenheit temperatures on the I2C LCD1602.
Note:
Open the 5.10_thermistor_lcd.py file located in the esp32-starter-kit-main\micropython\codes
path, or copy and paste the code into Thonny. Then, click “Run Current Script” or press F5 to execute it.
Make sure to select the “MicroPython (ESP32).COMxx” interpreter in the bottom right corner.
Here you need to use the library called lcd1602.py, please check if it has been uploaded to ESP32, for a detailed
tutorial refer to 1.4 Upload the Libraries (Important).
# Import the necessary libraries
from machine import ADC, Pin
from lcd1602 import LCD
(continues on next page)
3.28. 5.10 Temperature Sensing 391

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the SunFounder ESP32 and is the answer not in the manual?

SunFounder ESP32 Specifications

General IconGeneral
BrandSunFounder
ModelESP32
CategoryController
LanguageEnglish