Adafruit_i2cdevice H Library [best] Download -

Inside, you should see:

If you’ve ever tried to write a driver for a custom I2C sensor (like a barometer, OLED display, or magnetometer), you know the headache of managing Wire.beginTransmission() , Wire.write() , and Wire.endTransmission() over and over again.

Happy soldering, - The Team

Have a tricky I2C device that won't respond? Drop your logic analyzer screenshots in the comments below!

if (!i2c_dev.begin()) { Serial.println("Did not find device at 0x77"); while(1); } Serial.println("Found sensor!"); adafruit_i2cdevice h library download

Adafruit_I2CDevice.h <-- This is the file you wanted! Adafruit_SPIDevice.h Adafruit_BusIO_Register.h Once installed, using the library makes your code incredibly elegant. Here is how you would talk to a BMP280 sensor (address 0x77 ):

#include <Wire.h> #include <Adafruit_I2CDevice.h> Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(0x77); Inside, you should see: If you’ve ever tried

// Read the Chip ID register (0xD0) uint8_t chip_id; i2c_dev.readRegister8(0xD0, &chip_id); Serial.print("Chip ID: 0x"); Serial.println(chip_id, HEX); }