Thermistor
Overview
The thermistor resistance increases with temperature, which can be used to measure environmental temperature changes.
Technical Specifications
Operating voltage: VCC 3.3V -5V
Module dimensions: 24*48mm
Mounting: 2 plastic building block compatible through-holes
Measurement range: 0-100℃
Pin Definition
Pin |
Definition |
|---|---|
GND |
Ground |
VCC |
Power |
AO |
T emperature value |
NC |
Not connected |
1. Before use, insert the thermistor probe into the headphone jack on the module. Make sure the metal part of the headphone plug is fully inserted;
2. Connect the module to the analog input interface to directly obtain the temperature value in ℃.
3. The mPython Board OLED display shows the real-time temperature value measured by the sensor. When the temperature exceeds 28 degrees, the RGB LED lights up red; otherwise, it lights up green.
Example Code
Graphical code
from mpython import *
import math
from bluebit import *
import time
ntc_0 = NTC(0)
while True:
oled.fill(0)
oled.DispChar(str(str('Temp: ') + str(_ntc_0.getTemper())), 0, 0, 1)
oled.show()
if _ntc_0.getTemper() > 28:
rgb.fill((int(255), int(0), int(0)))
rgb.write()
time.sleep_ms(1)
time.sleep(1)
else:
rgb.fill((int(51), int(204), int(0)))
rgb.write()
time.sleep_ms(1)