In this lesson, DS18B20 is used to monitor the temperature at home so as to turn on the air conditioner in advance.
After creating a new project, click on the Simulation icon on the left side of the page to enter the Simulation page.
Enter the Simulation page and connect the SIG of DS18B20 Module to D7; VCC and GND to 3.3v and GND respectively.
Return to the Programming page, and click the IoT Control icon to enter the IoT Control page.
Click the ‘+’ button to add function blocks.
Click on the blank line of type, there appear actuators(for control) and sensors (for reading values). Here, we select sensors.
Type in the name, Temperature and click OK.
Go back to the Programming page, then drag a Connect WiFi block from the Raspberry Pi category to Start block.
Back to Programming page, drag out the post Temperature-1 block in the IoT category and place it in the Forever block, and select the DS18B20 block from the Sensor Kit category and put it in the back.
Connect to the main control board, then disconnect the Bluetooth connection after uploading the code to let the IoT transfer faster.
After entering the IoT Control page, click the run icon and you will see the temperature change.