[][src]Type Definition arduino_uno::I2cMaster

type I2cMaster<M> = I2cMaster<MHz16, M>;

I2C Master on pins A4 (SDA) and A5 (SCL)

Example

For a full example, see examples/leonardo-i2cdetect.rs. In short:

let dp = arduino_uno::Peripherals::take().unwrap();

let mut pins = arduino_uno::Pins::new(dp.PORTB, dp.PORTC, dp.PORTD);

let mut i2c = arduino_uno::I2cMaster::new(
    dp.TWI,
    pins.a4.into_pull_up_input(&mut pins.ddr),
    pins.a5.into_pull_up_input(&mut pins.ddr),
    50000,
);