pyupm_mma7455 module

class pyupm_mma7455.MMA7455(bus=0, devAddr=29)[source]

Bases: object

API for the MMA7455 Accelerometer.

ID: mma7455

Name: Three Axis +/- 2/4/8 g Digital Accelerometer

Category: accelerometer

Manufacturer: generic

Connection: i2c

Link:http://www.nxp.com/products/sensors/accelerometers/3-axis- accelerometers/2g-4g-8g-low-g-digital-accelerometer:MMA745xL This module defines the MMA7455 interface for libmma7455

C++ includes: mma7455.hpp

calibrate()[source]

mraa::Result calibrate()

Calibrates the sensor

0 (MRAA_SUCCESS) if successful; non-zero otherwise

i2cReadReg(reg, buffer, len)[source]

int i2cReadReg(unsigned char reg, uint8_t *buffer, int len)

Internal function for reading I2C data

reg: Register address

buffer: Register data buffer

len: Buffer size

i2cWriteReg(reg, buffer, len)[source]

mraa::Result i2cWriteReg(unsigned char reg, uint8_t *buffer, int len)

Internal function for writing I2C data

reg: Register address

buffer: Register data buffer

len: Buffer size

name()[source]

std::string name()

Returns the name of the component

Name of the component

readData(*args)[source]

std::vector< short > readData()

Reads X-axis, Y-axis, and Z-axis acceleration data

std::vector containing X, Y, Z acceleration data

class pyupm_mma7455.accelData[source]

Bases: object