Temp & Humidity

BlocklyProp reference for TEMP & HUMIDITY blocks

Available for Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types. I/O pin range options will vary with board type.

These blocks are for the CM2302 Temperature & Humidity Sensor (#28059). It is also compatible with most DHT22 and AM2302 models.

See the next page for a Getting Started tutorial, and/or watch the Tiny Tutorial video below.


Temp & Humidity read

The Temp & Humidity read block triggers a supported sensor connected to the specified I/O pin to take and store temperature and relative humidity readings.  Readings can be updated every 30 seconds.

The PIN menu this block can be set to "other."  When "other" is chosen, the dropdown menu disappears, and it is replaced with an input.  You can then use any block that provides a numeric value such as a number value, get variable, or constant value block:


Temp & Humidity value

The Temp & Humidity value block provides the specified measurement from the data stored by the last Temp & Humidity read block.  Choose the type of data from the drop-down menu. Options are:

  • temperature (°F) - temperature in degrees Fahrenheit, x 10
  • temperature (°C) - temperature in degrees Celsius, x 10
  • temperature (Kelvin) - temperature in Kelvin, x 10
  • relative humidity (%) - relative humidity, x 10

BlocklyProp uses integer math: The value returned by this block is 10 times the temperature or relative humidity measured by the sensor.  To display the reading, use a print multiple block's floating point option for the Terminal, LCD, or OLED, and choose to divide the value by 10 on that block. See the wiring diagram and example code on the next page.