This one was easier than I thought. I wanted to send/log data from my Raspberry Pi to Thingspeak.
Step 1 - Activate a Thingspeak Account and set up a channel
The channel has a number of fields. In this case, I use only one field, "field1".Step 2 - Get an API key for Thingspeak
The API Write key is necessary for Thingspeak to know what channel to publish to.
Step 3 - Send data to Thingspeak using "POST" with the channel number and the data.
The free version of Thingspeak allows for one update every 15 seconds. My script simply takes a number from the console and posts it to Thingspeak with a 15 second interval.
The result:
No comments:
Post a Comment