I2C
I2C
This Hardware module allows to use the in/outputs provided by I2C bus.
This datastreams corresponds to the I2C devices connected to the device.
To access source code click here.
Dependencies
This module requires the following modules:
- Commons: Provide API’s of I2C and the basic APIs to register the service.
Configuration
To configure I2C Hardware module, a file named es.amplia.oda.hardware.i2c.cfg must be created with the next parameters for each input channel that you want to register:
- name: Required parameter. Identifier name of the datastream.
- controller: Required parameter. Number of the controller of datastream. Controller and address form the direction to i2c source.
- address: Required parameter. Number of the address of datastream. Controller and address form the direction to i2c source.
- register: Required parameter. Position of the formed direction where the data of the datastream is stored.
- min: Required parameter, if min > max then min = 0. Specifies the minimum value that the input value will reach when it’s at its minimum.
- max: Required parameter, if min > max then max = 1. Specifies the maximum value that the input value will reach when it’s at its maximum.
es.amplia.oda.hardware.i2c.cfg will have a similar format to:
light=controller:1,address:10,register:255,min:0,max:10
temperature=controller:2,address:10,register:124,min:-10,max:50