Step 1: What You’ll Need
- A RaspberryPi
- 9 V battery – for powering the BrickPi board and sensor
- Dexter Industries Thermometer
Step 2: Signup for Thingspeak
First signup for the new account in thingspeak at https://www.thingspeak.com
Step 3: Login to Thingspeak
Login to your account and click on the channels icon.
Step 4: Create a Channel for Your Data
Create a new channel by clicking on the “Create New Channel” button.
Step 5: Name Your Project
- Give a name for your project and fill the field column with the information you are plotting. Eg : Temperature.
- Fill only one field column since we are plotting the data on a single thermometer.
Step 6: Update the Channel
Click the Update “Channel button” after completing the Channel Settings.
Step 7: Get an API Key
Click on the API Keys tab and copy down the API_KEY value. We will use this in the python script later.
Step 8: Check the Graph
Click on the Private view tab to look at the graph. It wont show anything now since the python code isn’t running. We will come to this later.
Step 9: Open the Python Example
We wrote a quick example in the Python Examples section of the python code on Github.
You can get the entire BrickPi_Python Repository by running the following commands (this is explained in more detail in our Python Programming Section here).
sudo apt-get install python-setuptools
sudo python setup.py install
Now, open the example “Thermometer_Thingspeak.py” in the /BrickPi_Python/Project_Examples/Thingspeak_Temperature_Logging directory.
- Now in the python code and search for : ” ‘key':’N71BQXDNFTABINT7′ “
- In place of ‘N71BQXDNFTABINT7′ type the API key value that was generated for you.
For more detail: ThingSpeak Temperature Monitor with Raspberry Pi