In this guide we'll show you how to make a small improvement to the Fire-EdUp Platform to automatically capture temperature data. This will save us having to input the data manually - and could in theory be extended to many more calculation parameters.
For this guide we'll be using a TMP117 Precision Temperature Sensor which is accurate to 0.1°C - not bad!
Prepare Temperature Sensor
The Precision Temperature Sensor features 4 switches labelled ASW that need to be set up correctly. Double-check that Switch #1 is in the ON position (Up), and the remaining three switches are OFF (Down) as shown below.
Modify Example Code
To enable the external temperature sensor, change the following line from:
data = firedup.collect_data()
To:
data = firedup.collect_data(use_temperature_sensor = True) # ignore the slider and read the Precision Temperature Sensor
The argument use_temperature_sensor
is completely optional - when it's omitted the Fire-EdUp platform assumes we want to use the slider. If we set this value to True
then the slider is ignored and the temperature sensor is used instead.
Important make sure your temperature sensor is connected or you may get an error.
Once your temperature sensor code is running, observe how the temperature should reflect the current temperature of your environment. Touching the sensor or fanning it ought to change the temperature immediately.
Where to From Here?
We've made our Fire-EdUp Platform just a little bit more automatic. Can you think of other parameters that could be captured automatically?
Humidity and Wind Speed are often captured by local weather stations, but what about parameters like Fuel Load and Fuel Moisture Content?