Arduino driver for the Maxim DS2482 I2C to 1-Wire bridge.
The DS2482 acts as a hardware interface between an I2C master and 1-Wire devices, enabling reliable communication with sensors like DS18B20 temperature sensors and other 1-Wire peripherals.
-
I2C to 1-Wire bridge communication
-
1-Wire reset and presence detection
-
Single byte read/write operations
-
Multi-byte read/write support
-
ROM commands:
- Match ROM
- Skip ROM
-
Device discovery using ROM search
-
Supports multiple 1-Wire devices on same bus
-
CRC8 validation for data integrity
-
Efficient bus handling using hardware-assisted timing
The DS2482 communicates via I²C.
| DS2482 Pin | MCU Pin | Notes |
|---|---|---|
| VCC | 3.3V / 5V | Depends on module |
| GND | GND | Common ground |
| SDA | SDA | I²C data |
| SCL | SCL | I²C clock |
1-Wire Bus
| DS2482 Pin | Connection |
|---|---|
| IO | 1-Wire Data Line |
| VCC | 3.3V/ 5V |
| GND | Common ground |
-
Default I²C address:
0x18 -
Supported bus speeds:
- 100 kHz
- 400 kHz (recommended)
-
Arduino Library Manager
- Open Arduino IDE
- Go to Library Manager
- Search for 7Semi DS2482
- Click Install
-
Manual Installation
- Download this repository as ZIP
- Arduino IDE → Sketch → Include Library → Add .ZIP Library
DS2482_7Semi ds;
ds.begin(0x18);
if (ds.searchROM())
{
uint8_t count = ds.getDeviceCount();
}- Returns temperature in °C.
uint8_t *device = ds.getDevice(0);