Raspberry Pi IoT Project: Temperature Part 3 – Tweet Bot (Raspberry Pi / Python)

With the Raspberry Pi set up (see parts 1 and 2) it is time to expand the project. First up is bringing back the geektechstuff_automated twitter bot to get it to regularly tweet the room temperature.

temperature_tweet_bot_geektechstuff
geektechstuff tweet bot now with temperature readings

Thankfully my previous experience with Twitter let me reuse some of my old coding:

temperature_tweet_geektechstuff
Full code at https://github.com/geektechdude/twitter_sensor

And using a crontab I can leave the Raspberry Pi to take a temperature reading every 30 mins and post the details to Twitter.

twtter_temperature_cron_geektechstuff
Setting up a cron job to run every 30 minutes

The full code for my temperature tweet bot can be found at https://github.com/geektechdude/twitter_sensor. Twitter API keys are needed for this project, I am currently storing my in a Python file called auth which contains values for:

consumer_key
consumer_secret
access_token
access_token_secret

3 responses to “Raspberry Pi IoT Project: Temperature Part 3 – Tweet Bot (Raspberry Pi / Python)”

  1. Installing / Using Flask or Raspberry Pi IoT Project: Temperature Part 4 (Raspberry Pi / Python) – Geek Tech Stuff Avatar

    […] that the temperature sensor is taking readings and tweeting them I want to look at exporting the results another way, and what better way than a web page. I […]

    Like

  2. Azure IoT Hub / Raspberry Pi IoT Project – Connecting Pi and Azure (Raspberry Pi / Python) – Geek Tech Stuff Avatar

    […] for my IoT Temperature Project, setup the hardware, took measurements and outputted them to a Twitter bot. Then yesterday I created an Azure IoT Hub, which means I now need to connect the Raspberry Pi to […]

    Like

  3. Saving Sensor Readings To CSV (Python / Raspberry Pi) – Geek Tech Stuff Avatar

    […] far I have looked at outputting the data from my sensors to Flask, Twitter and Azure. However, a simpler option could be to output the date to a CSV (Comma Seperated Value) […]

    Like

Welcome to GeekTechStuff

my home away from home and where I will be sharing my adventures in the world of technology and all things geek.

The technology subjects have varied over the years from Python code to handle ciphers and Pig Latin, to IoT sensors in Azure and Python handling Bluetooth, to Ansible and Terraform and material around DevOps.

Let’s connect