module I2CDevice::Driver

Public Instance Methods

i2cget(address, param, length=1) click to toggle source

Low-level method for i2cget Driver must implement this.

address
Integer

7-bit slave address without r/w bit. MSB is always 0.

data
Array

Writing bytes array.

Returns
String

Wrote bytes

# File lib/templates/grove_pi/i2c/driver.rb, line 16
def i2cget(address, param, length=1)
        raise NotImplementedError
end
i2cset(address, *data) click to toggle source

Low-level method for i2cset Driver must implement this.

address
Integer

7-bit slave address without r/w bit. MSB is always 0.

data
Array

Writing bytes array.

Returns
String

Wrote bytes

# File lib/templates/grove_pi/i2c/driver.rb, line 25
def i2cset(address, *data)
        raise NotImplementedError
end