Skip to content

Streams temperature readings from an I2C Analog Devices ADT7410 to HomeKit using HomeSpan

License

Notifications You must be signed in to change notification settings

HomeSpan/TempSensorI2C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TempSensorI2C - A HomeSpan Project

TempSensorI2C is a working example of how to use the I2C protocol to capture temperature readings from an Analog Device ADT7410 high-resolution temperature sensor and stream them to HomeKit. Built using the HomeSpan HomeKit Library, TempSensorI2C is designed to run on an ESP32 device as an Arduino sketch.

Hardware used for this project:

Overview

This simple HomeSpan sketch illustrates how the standard Arduino I2C library Wire.h can be used to capture temperature readings from an ADT7410 temperature sensor and stream them to HomeKit. The sketch:

  • implements a single HomeKit Accessory containing a HomeKit TemperatureSensor Service;
  • captures samples from the ADT7410 every 5 seconds;
  • sends updates to HomeKit only if the temperature has changed by more than 0.5 Celsius; and
  • is easily modified to accomodate up to 4 ADT7410 sensors, each with their own unique I2C address.

Connections

The connections below provide for I2C communicaiton between the ESP32 and the ADT7410 using the 7410's default address of 0x48:

ADT7410 ESP32
VIN 3V
GND GND
SDA SDA
SCL SCL
A0 unused
A1 unused
INT unused
CT unused

Feedback or Questions?

Please consider adding to the Discussion Board, or email me directly at homespan@icloud.com.

About

Streams temperature readings from an I2C Analog Devices ADT7410 to HomeKit using HomeSpan

Topics

Resources

License

Stars

Watchers

Forks