The following code, for the device only, makes use of HTS221 temperature and humidity sensor mounted onto the imp006 Breakout Kit.
It also makes use of a Seeed 4-digit LED, available separately. It is connected to the inner of the imp006 Breakout Kit’s two Grove connectors.
Note To use the other connector, you will need to change the pins in line 238 to
hardware.pinN, in that order.
The code makes use of an Electric Imp library to load the HTS221 driver code, but the display driver code is included in the code. It is implemented as a Squirrel class.
The code takes regular sensor readings; the temperature is displayed on the connected display.
Note To display the humidity, change the property of
humidity in line 248. You may also want to comment out line 258, which puts a
c at the end of the displayed reading, for Celsius.