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 
 - 
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 
 - 
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 
 - 
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 
 - 
updateAccel()[source]¶
- void updateAccel() - Updates the latest accelerometer readings by calling Firmata 
 
-