A temperature sensor is an analog electronic sensor that produces a voltage proportionate to the temperature it is subjected to.
This block can be used receive temperature values in ºC/ ºF from a Temperature sensor. The sensor can be the on-board Temperature sensor (TM), or an external sensor connected to any of the ports S1, S2, S3.
Note: While connecting an external sensor to the Cloudio board, care must be taken to match the polarities of the sensor with that of the port (S1/S2/S3) that it is being connected to.
Here, you can select the port the sensor is selected to.
• TM (if you’re using the on-board sensor),
or
• S1/S2/S3 (if you’re using an external Temperature sensor connected to either of the 3 ports)
Here, you can select the operator to be used while comparing the temperature values received against the threshold value set in the next step.
You can set a threshold temperature value for comparison. Press the C/F button to select the unit of measurement.
You can use the Read option to read/receive real-time values from the port selected.
After you set the parameters for the block, you can press Done to confirm and save your changes.
Note: This is a code snippet to explain the working of the block. In this case, this code will be executed once and at the time of uploading the code.
You will need to use this snippet inside a loop infinitely block if you want this code to run on the board for the entire duration that the board is on.