Arduino and GY_21P sensor data to Thingspeak example

In this example we connect an Ethernet shield to an Arduino, we then connect a GY-21P sensor to this and we will send the values to Thingspeak

Lets take a look at the GY-21P.

Sensor Overview

The GY-21P is an interesting module in that it combines a BMP280 sensor and an SI7021 sensor. The on-board BMP280+SI7021 sensor measures atmospheric pressure from 30kPa to 110kPa as well as relative humidity and temperature.

Thingspeak setup

You will now need to create a new account at thingspeak – https://thingspeak.com. Once done create a new channel and add one new field called temperature. You can see this in a screen capture of my simple channel, notice the ChannelID you will need that in your code later. You can also fill in other fields such as Name, description and there are a few others as well. The key one(s) are Field1, Field 2 , Field 3, Field 4 and Field 5 – this effectively is the data you send to thingspeak