How to Post on Twitter from Arduino and ESP8266 IoT Project

Twitter is a free social platform that can be very useful for your IoT project. You can use it instead of paying for a messaging platform. In this project, I will teach you how you can use Twitter to send temperature alerts from your internet-enabled Arduino project. The project utilizes ESP8266 WiFi module to connect Arduino to the internet. The wifi module hooks onto the home wifi for internet. You can also use the ESP8266 alone but in this simple project, we shall use it together with Arduino Uno. For integration with Twitter, the project uses Thingspeak’s ThingTweet App.

ThingTweet is a twitter integration app built by ThingSpeak that allows your IoT project to send tweet messages. You can use the App to send alerts via Twitter. For example, you can send an alert when the temperature in your room reaches a certain value. In this post, you will learn how to integrate your Twitter account with ThingSpeak through the ThingTweet app and post your first tweet alert when the temperature reading on TPM36 sensor exceeds 29 degrees Celcius

Project requirements

Arduino

ESP8266

10k resistor

Temperature sensor FTDI chip/ CP2102/Voltage divider

Assumptions: I am assuming you have connected your ESP8266 Wi-Fi Module and that your WiFi has internet connectivity.

Building the Circuit for the Simple IoT Project

The circuit for this project is very simple. Using the following schematic diagram to build your circuit.

Schematic Diagram

how to tweet with arduino using thingspeak
Schematic diagram for Arduino + ESP8266 + Thingspeak Twitter project

Description

To measure temperature, I am using the TMP36 analog temperature sensor. This is a small solid-state, transistor-like chip that measures the ambient temperature. It uses the principle of the proportional increase of voltage across a diode with an increase in temperature. When this voltage change is them amplified, a measurable analog voltage output is produced. The ADC detects this signal and converts it to a 10-bit value. In this case, I am using Arduino to do the ADC processing of the TMP36 analog output signal.

Arduino Sketch

Video: How to Post on Twitter from Arduino ESP8266 Project

In this video, you will learn how to send temperature alert messages on twitter from an Arduino and ESP8266 IoT Project using Thingspeak’s ThingTweet App