This chapter will take about 10 minutes to read. It mainly introduces an open source WiFi temperature sensor (DS18B20) based on nodemcu (esp8266) which can be used on DeviceBit.
No. | Sort | Name | Description |
---|---|---|---|
1 | Hardware | Nodemcu DS18B20 | ![]() |
2 | Software | FLASH_DOWNLOAD_TOOLS_V3.6.4 | Nodemcu Download tool |
As the picture shown below, supply power to the 18b20 with nodemcu and connect the 18B20 data cable to D5 pin of ndoemcu.
Hardware schematic:
Firmware download software:FLASH_DOWNLOAD_TOOLS_V3.6.4
Firmware : https://github.com/lewei50/lua-on-nodemcu/tree/master/demo/ESP8266-DS18B20/bin
Download firmware:
After the download is complete, restart the device
Log in to https://www.devicebit.com , sign up and then sign in.
Note: to select the correct template.
Click on Save
There will be three sensors on the sensor page after click on Save successfully.
Each account has a userkey, and each device has an ID. Record the userkey_ID of the newly created template device, as shown below.
Restart nodemcu,find the following ap of ssid, and connect to it. The password is 12345678.
Visit http://192.168.4.1/dev ,see the following page
TcpServer:User's own server address (described later, optional) SN:The userkey_ID of the user account of the platform (introduced in Chapter 3.2), shown as follows:
Click on Save when the configuration is done.
Visit 192.168.4.1 to configure related wifi parameters, and then click on Save.
The device will restart automatically. If everything is normal, you will see there is one more device in the network of the windows system. Its name is DS18B20_SN. You can modify the configuration at any time.
This open source WiFi HT is not bound to the cloud platform. In addition to uploading data to the platform, it can also implement the following applications.
Mainly for LAN applications without internet
Inside the data array is the temperature value, which is updated in 10 seconds.
The firmware periodically sends {"status": "succeed", "data": [28.1875], "mac": "18fe34e0b7d8"} every minute as a heartbeat packet. The firmware responds to the read command and returns {"status":"succeed","data":[28.1875],"mac":"18fe34e0b7d8"} (The data in the data array is the real-time temperature value.)