# jrowberg/i2cdevlib

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jrowberg-i2cdevlib).**

4,251 stars · 7,433 forks · C++

## Links

- GitHub: https://github.com/jrowberg/i2cdevlib
- Homepage: http://www.i2cdevlib.com
- awesome-repositories: https://awesome-repositories.com/repository/jrowberg-i2cdevlib.md

## Description

i2cdevlib is a collection of peripheral drivers and hardware abstraction layers designed for I2C devices. It provides a sensor driver collection, a register map database, and a peripheral manager to coordinate communication between microcontrollers and hardware components.

The project utilizes a hardware abstraction layer to decouple device logic from specific microcontroller hardware and wire libraries. This transport-layer abstraction allows the same device drivers to remain portable across different hardware architectures.

The library covers a broad range of hardware integration, including motion and inertial sensors, environmental monitors, real-time clocks, and capacitive touch sensing. It also includes support for GPIO expansion, analog-to-digital conversion, and the driving of OLED displays and digital meters.

The system includes tools for I2C protocol debugging and traffic analysis, enabling the correlation of raw logic analyzer data with human-readable register map definitions.

## Tags

### Hardware & IoT

- [I2C Bus Interfaces](https://awesome-repositories.com/f/hardware-iot/i2c-bus-interfaces.md) — Provides standardized software interfaces for connecting microcontrollers to peripherals via the I2C protocol.
- [Bus Transport Interfaces](https://awesome-repositories.com/f/hardware-iot/bus-transport-interfaces.md) — Implements a generic transport interface for bus operations, enabling driver portability across different hardware architectures.
- [Hardware Abstraction Layers](https://awesome-repositories.com/f/hardware-iot/hardware-abstraction-layers.md) — Implements hardware abstraction layers to decouple device driver logic from specific microcontroller hardware.
- [Peripheral Abstractions](https://awesome-repositories.com/f/hardware-iot/hardware-component-class-definitions/peripheral-abstractions.md) — Wraps I2C peripheral behaviors into standardized C++ classes to simplify interaction with diverse hardware.
- [Hardware Peripheral Drivers](https://awesome-repositories.com/f/hardware-iot/hardware-peripheral-drivers.md) — Provides a collection of specialized driver layers for various I2C sensors and peripherals.
- [I2C Register Maps](https://awesome-repositories.com/f/hardware-iot/i2c-register-maps.md) — Maintains a repository of bitfield definitions and register maps used to generate drivers and analyze bus traffic.
- [Sensor Drivers](https://awesome-repositories.com/f/hardware-iot/integration-performance/hardware-interfacing-integration/hardware-integration/device-sensors/external-integrations/sensor-integrations/sensor-drivers.md) — Provides a comprehensive set of drivers for reading data from accelerometers, gyroscopes, and pressure sensors.
- [I2C I/O Expansion](https://awesome-repositories.com/f/hardware-iot/digital-i-o-controllers/i2c-i-o-expansion.md) — Increases the number of available general-purpose input and output pins via an external 24-bit I2C expander. ([source](http://www.i2cdevlib.com/manufacturers/texasinstruments))
- [I2C Port Expanders](https://awesome-repositories.com/f/hardware-iot/gpio-pin-controllers/i2c-port-expanders.md) — Increases available digital input and output pins using external I2C port expanders.
- [Gyroscope Data Capture](https://awesome-repositories.com/f/hardware-iot/gyroscope-data-capture.md) — Retrieves angular velocity measurements across three axes from a gyroscope sensor via the I2C protocol. ([source](http://www.i2cdevlib.com/devices/itg3200))
- [Multi-Bus Management](https://awesome-repositories.com/f/hardware-iot/i2c-bus-interfaces/multi-bus-management.md) — Coordinates multiple communication objects to enable simultaneous interaction with several hardware buses. ([source](https://cdn.jsdelivr.net/gh/jrowberg/i2cdevlib@master/README.md))
- [I2C Traffic Analysis](https://awesome-repositories.com/f/hardware-iot/i2c-traffic-analysis.md) — Analyzes I2C bus traffic and correlates raw data packets with register maps to troubleshoot communication.
- [Inertial Measurement Unit Interfaces](https://awesome-repositories.com/f/hardware-iot/inertial-measurement-unit-interfaces.md) — Collects combined acceleration and rotation measurements from 6-axis or 9-axis inertial measurement units. ([source](http://www.i2cdevlib.com/manufacturers/invensense))
- [Magnetometer Interfaces](https://awesome-repositories.com/f/hardware-iot/magnetometer-interfaces.md) — Measures terrestrial magnetism and magnetic flux density across three axes to determine heading and 3D orientation. ([source](http://www.i2cdevlib.com/devices/ak8975))
- [Real-Time Clock Management](https://awesome-repositories.com/f/hardware-iot/real-time-clock-management.md) — Implements a standardized I2C interface to read and write time and date information to hardware real-time clocks. ([source](http://www.i2cdevlib.com/manufacturers/maxim))
- [Register-Map Driver Generation](https://awesome-repositories.com/f/hardware-iot/register-map-driver-generation.md) — Automatically produces functional driver code and bitfield access patterns based on predefined hardware register specifications.
- [Register-to-Human Mappings](https://awesome-repositories.com/f/hardware-iot/register-to-human-mappings.md) — Provides tools to correlate raw I2C bus traffic with human-readable register map definitions for easier debugging.
- [Triaxial Acceleration Measurement](https://awesome-repositories.com/f/hardware-iot/triaxial-acceleration-measurement.md) — Provides drivers to retrieve high-resolution 3-axis acceleration and gravity measurements for detecting motion, shock, or tilt. ([source](http://www.i2cdevlib.com/manufacturers/stmicroelectronics))

### Game Development

- [Hardware Porting](https://awesome-repositories.com/f/game-development/hardware-porting.md) — Adapts the codebase to run across different microprocessor systems by abstracting transport operations. ([source](https://cdn.jsdelivr.net/gh/jrowberg/i2cdevlib@master/README.md))

### Operating Systems & Systems Programming

- [Transport Abstraction Layers](https://awesome-repositories.com/f/operating-systems-systems-programming/transport-abstraction-layers.md) — Decouples high-level device logic from low-level hardware communication libraries to ensure portability.
- [Driver Code Generators](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/kernel-development/kernel-driver-implementation/device-drivers/driver-code-generators.md) — Automatically creates functional management code and bitfield access patterns using defined register map specifications. ([source](http://www.i2cdevlib.com))

### Data & Databases

- [Hardware Register Databases](https://awesome-repositories.com/f/data-databases/hardware-register-databases.md) — Maintains a comprehensive database of register maps and bitfield definitions for a wide variety of I2C hardware. ([source](http://www.i2cdevlib.com))

### System Administration & Monitoring

- [Bus Traffic Correlation](https://awesome-repositories.com/f/system-administration-monitoring/anomaly-detection/correlated/bus-traffic-correlation.md) — Correlates raw logic analyzer data with register maps to display human-readable names instead of hexadecimal values. ([source](http://www.i2cdevlib.com))

### User Interface & Experience

- [Capacitive Touch Sensing](https://awesome-repositories.com/f/user-interface-experience/touch-gesture-detection/capacitive-touch-sensing.md) — Provides the ability to read touch and proximity data from capacitive sensors via I2C to detect user interaction. ([source](http://www.i2cdevlib.com/manufacturers/azoteq))
