Skip to content

I2C support

Choose a tag to compare

@dionisiydk dionisiydk released this 05 Feb 16:01
d35f08e

I2CDevice is introduced to implement devices driven by I2C protocol.

As example accelerometer sensor ADXL345 is implemented.
Look at #connect and #readCoordinates methods for details.

In short: i2c device provides i2cConnection variable which should be used by concrete device class to read/write required data from physical device.
The instance of i2c connection is obtained from board using:

board connectToI2CDevice: 16r53 "address of ADXL345"