Inter-Integrated Circuit, aka I2C, is a two-wire protocol for connecting sensors and "devices" to a microcontroller. A large number of sensors, including the ones sold by Adafruit, use I2C to communicate.
Typically, using I2C with a microcontroller involves programming. Adafruit IO and WipperSnapper let you configure a microcontroller to read data from an I2C sensor and publish that data to the internet without writing code.
The WipperSnapper firmware supports a number of I2C sensors, viewable in list format here.
- If you do not see the I2C sensor you're attempting to use with WipperSnapper, we have a guide on adding a component to Adafruit IO WipperSnapper here.
The process for adding an I2C component to your board running WipperSnapper is similar for most sensors.
On this page, you'll learn how to configure an I2C sensor built into a development board to send data to Adafruit IO. Then you'll learn how to locate, interpret, and download the data produced by your sensors.
Where is the I2C sensor on my board?
Your board has an I2C sensor built-in meaning that there's no wiring required!
-
On the top of the PyPortal (not the Pynt) is the ADT7410 Analog Devices temperature sensor with 16-bit 0.0078°C temperature resolution and 0.5°C temperature tolerance.
Create ADT7410 Sensor Component
On the device page, click the New Component (or "+") button to open the component picker.
Search for the component name by entering ADT7410
into the text box on the component picker, the list of components should update as soon as you stop typing.
WipperSnapper supports such a large number of components we added filtering!
Try searching for various keywords, like:
- component names:
adt7410
,servo
,buzzer
,button
,potentiometer
- sensor types:
light
,temperature
,pressure
,humidity
, etc - interface:
i2c
,uart
,ds18x20
,pin
, etc (also I2C addresses e.g.0x44
) - vendor:
Adafruit
,ASAIR
,Infineon
,Bosch
,Honeywell
,Sensirion
, etc
We’ve also added product and documentation links to every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn-Guide.
Select the ADT7410 from the list of results to go to the component configuration page.
There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.
On the component configuration page, the ADT7410's I2C sensor address should be listed along with the sensor's settings.
The ADT7410 sensor can measure ambient temperature. This form has individual options for reading the ambient temperature, in either Celsius or Fahrenheit. You may select the readings which are appropriate to your application and region.
The Send Every option is specific to each sensor measurement. This option will tell the board how often it should read from the sensor and send the data to Adafruit IO. Measurements can range from every 30 seconds to every 24 hours.
For this example, set the Send Every interval for both seconds to Every 30 seconds. Click Create Component.
The board page should now show the ADT7410 component you created. After the interval you configured elapses, the WipperSnapper firmware running on your board automatically reads a value from the sensor and sends it to Adafruit IO.
Read I2C Sensor Values
Now to take a look behind the scenes at a powerful element of using Adafruit IO and WipperSnapper. When a new component is created on Adafruit IO, an Adafruit IO Feed is also created. This Feed holds your sensor component's values for long-term storage (30 days of storage for Adafruit IO Free and 60 days for Adafruit IO Plus plans).
Aside from holding the values read by a sensor, the component feed also holds metadata about the data pushed to Adafruit IO. This includes settings for whether the data is public or private, what license the stored sensor data falls under, and a general description of the data.
Now, let's take a look at the ADT7410's temperature sensor feed. To navigate to a component's feed, click on the chart icon in the upper-right-hand corner of the component.
On the component's feed page, you'll each data point read by your sensor and when they were reported to Adafruit IO.
Doing more with your sensor's Adafruit IO Feed
We've only scratched the surface of what Adafruit IO Feeds can accomplish for your IoT projects. For a complete overview of Adafruit IO Feeds, including tasks like downloading feed data, sharing a feed, removing erroneous data points from a feed, and more, head over to the "Adafruit IO Basics: Feed" learning guide.
Text editor powered by tinymce.