
Bluetooth LE Thermometer: ESP32 and DS18B20 on the Standard Environmental Sensing Service
A wireless thermometer from an ESP32 board and a DS18B20 probe. It uses the Bluetooth SIG's own Environmental Sensing service and Temperature characteristic, so a generic BLE scanner app on a phone can read it and get updates every two seconds, with no custom app.
نیا سیکھنے والا
1 hour
ہدایات
1
1
How it reports
How it reports
The board advertises service 0x181A, Environmental Sensing. Its characteristic 0x2A6E, Temperature, holds a signed 16-bit number in hundredths of a degree Celsius, low byte first: 2150 is 21.50 °C. The value 0x8000 means "not known" and is sent if the probe is unplugged. The DS18B20 reads to ±0.5 °C between -10 and +85 °C.
2
2
Wire the probe
Wire the probe
DS18B20 power (red) to 3V3, ground (black) to GND, data (yellow) to GPIO 4. Put a 4.7 kΩ resistor between data and 3V3: the 1-Wire bus needs that pull-up.
اس مرحلے کے لیے مواد:
ESP32 ترقیاتی بورڈ1 ٹکڑا
DS18B20 حرارت محسوس کرنے والا1 piece (waterproof probe)
ریزسٹر1 piece (4.7 kΩ)
جمپر تاریں4 ٹکڑےدرکار اوزار:
بریڈ بورڈ3
3
Load the program
Load the program
In the Arduino IDE add the ESP32 boards and the OneWire and DallasTemperature libraries, choose "ESP32 Dev Module" and upload. The serial monitor at 115200 shows each reading.
ble_thermometer.inocpp
درکار اوزار:
ڈیسک ٹاپ کمپیوٹر
USB ڈیٹا کیبل4
4
Read it on a phone
Read it on a phone
Open any BLE scanner app, connect to "Youblob Thermometer", open Environmental Sensing and read or subscribe to Temperature. Apps that know the standard show °C directly; others show the two bytes, which you read low byte first and divide by 100.
درکار اوزار:
اسمارٹ فونمواد
4- 1 ٹکڑاپلیس ہولڈر
- 1 piece (waterproof probe)پلیس ہولڈر
- پلیس ہولڈر
- پلیس ہولڈر
درکار اوزار
4- 1 vendor sell this, none ship to you yetپلیس ہولڈر
- پلیس ہولڈر
- پلیس ہولڈر
- پلیس ہولڈر
یہ بلوپرنٹ بناتا ہے
CC0 پبلک ڈومین
یہ بلیو پرنٹ CC0 کے تحت جاری کیا گیا ہے۔ آپ اجازت لیے بغیر اس کام کو نقل، ترمیم، تقسیم اور کسی بھی مقصد کے لیے استعمال کرنے کے لیے آزاد ہیں۔
میکر کی حمایت کریں ان کے بلیو پرنٹ کے ذریعے پروڈکٹس خرید کر جہاں وہ میکر کمیشن وینڈرز کی طرف سے مقرر، کماتے ہیں، یا اس بلیو پرنٹ کی نئی تکرار بنائیں اور آمدنی شیئر کرنے کے لیے اسے اپنے بلیو پرنٹ میں کنکشن کے طور پر شامل کریں۔
