pyupm_curieimu module

class pyupm_curieimu.CurieImu(subplatform_offset=512)[source]

Bases: object

API for the Curie IMU via Firmata.

ID: curieimu

Name: Curie IMU Sensor using Firmata

Other Names: Curie IMU Sensor for Arduino/Genuino 101 running Firmata

Category: serial accelerometer compass

Manufacturer: bosch

Connection: uart Curie IMU is a 6-axis accelerometer

This module has been tested on an Arduino/Genuino 101 running ConfigurableFirmata with CurieIMU

C++ includes: curieimu.hpp

enableShockDetection(enable)[source]

void enableShockDetection(bool enable)

Turns shock detection notifications on/off

enable: enables/disables notifications

enableStepCounter(enable)[source]

void enableStepCounter(bool enable)

Turns step counter notifications on/off

enable: enables/disables notifications

enableTapDetection(enable)[source]

void enableTapDetection(bool enable)

Turns tap detection notifications on/off

enable: enables/disables notifications

getAccel()[source]

int16_t * getAccel()

Returns last accelerometer reading X, Y, and Z axis

pointer to array with X-axis, Y-axis & Z-axis value

getAccelX()[source]

int16_t getAccelX()

Returns last accelerometer reading X axis

X-axis value

getAccelY()[source]

int16_t getAccelY()

Returns last accelerometer reading Y axis

Y-axis value

getAccelZ()[source]

int16_t getAccelZ()

Returns last accelerometer reading Z axis

Z-axis value

getAxis()[source]

int16_t getAxis()

Returns last shock or tap axis reading

axis value

getDirection()[source]

int16_t getDirection()

Returns last shock or tap direction reading

direction value

getGyro()[source]

int16_t * getGyro()

Read gyroscope X, Y, and Z axis

pointer to array with X-axis, Y-axis & Z-axis value

getGyroX()[source]

int16_t getGyroX()

Returns last gyroscope reading X axis

X-axis value

getGyroY()[source]

int16_t getGyroY()

Returns last gyroscope reading Y axis

Y-axis value

getGyroZ()[source]

int16_t getGyroZ()

Returns last gyroscope reading Z axis

Z-axis value

getMotion()[source]

int16_t * getMotion()

Reads the X, Y, and Z axis of both gyroscope and accelerometer

pointer to array with X-axis, Y-axis & Z-axis values for accelerometer, and then X-axis, Y-axis & Z-axis values for gyroscope

getNextShock()[source]

void getNextShock()

Gets shock detect data from queue. Then m_axis gets axis data, and m_direction gets direction data

getNextTap()[source]

void getNextTap()

Gets tap detect data from queue. Then m_axis gets axis data, and m_direction gets direction data

getStepCount()[source]

int16_t getStepCount()

Gets step count data from queue

the total number of steps taken

getTemperature()[source]

int16_t getTemperature()

Reads the internal temperature

16-bit integer containing the scaled temperature reading

isShockDetected()[source]

bool isShockDetected()

Has there been a shock detected?

true if any unprocessed shock notifications are in the queue

isStepDetected()[source]

bool isStepDetected()

Has there been a step detected?

true if any unprocessed step notifications are in the queue

isTapDetected()[source]

bool isTapDetected()

Has there been a tap detected?

true if any unprocessed tap notifications are in the queue

lock()[source]

void lock()

Locks responses from Firmata

proceed()[source]

void proceed()

Proceed with original function call now that response from Firmata has been received

processResponse()[source]

void processResponse()

Processes asyncronous responses returned from Firmata

setResults(buf, length)[source]

void setResults(uint8_t *buf, int length)

Set results being returned from Firmata for processing

buf: is the buffer

length: is the length of results buffer

unlock()[source]

void unlock()

Unlocks responses from Firmata

updateAccel()[source]

void updateAccel()

Updates the latest accelerometer readings by calling Firmata

updateGyro()[source]

void updateGyro()

Updates the latest gyroscope readings by calling Firmata

updateMotion()[source]

void updateMotion()

Updates the both the latest accelerometer & gyroscope readings by calling Firmata

waitForResponse()[source]

void waitForResponse()

Wait for a response from Firmata before proceeding

class pyupm_curieimu.IMUDataItem[source]

Bases: object

axis
direction
class pyupm_curieimu.int16Array(nelements)[source]

Bases: object

cast()[source]
static frompointer()