Struct i2cdev::sensors::nunchuck::Nunchuck [] [src]

pub struct Nunchuck<T: I2CDevice> {
    // some fields omitted
}

Methods

impl<T> Nunchuck<T> where T: I2CDevice

fn new(i2cdev: T) -> I2CResult<Nunchuck<T>>

Create a new Wii Nunchuck

This method will open the provide i2c device file and will send the required init sequence in order to read data in the future.

fn init(&mut self) -> I2CResult<()>

Send the init sequence to the Wii Nunchuck

fn read(&mut self) -> I2CResult<NunchuckReading>