| 
    upm
    1.1.0
    
   Sensor/Actuator repository for libmraa (v1.5.1) 
   | 
 
API for the Curie IMU via Firmata. More...
Curie IMU is a 6-axis accelerometer
This module has been tested on an Arduino/Genuino 101 running ConfigurableFirmata with CurieIMU
Public Member Functions | |
| CurieImu (int subplatform_offset=512) | |
| ~CurieImu () | |
| void | updateAccel () | 
| void | updateGyro () | 
| void | updateMotion () | 
| int16_t * | getAccel () | 
| int16_t | getAccelX () | 
| int16_t | getAccelY () | 
| int16_t | getAccelZ () | 
| int16_t * | getGyro () | 
| int16_t | getGyroX () | 
| int16_t | getGyroY () | 
| int16_t | getGyroZ () | 
| int16_t | getTemperature () | 
| int16_t * | getMotion () | 
| int16_t | getAxis () | 
| int16_t | getDirection () | 
| void | enableShockDetection (bool enable) | 
| bool | isShockDetected () | 
| void | getNextShock () | 
| void | enableStepCounter (bool enable) | 
| bool | isStepDetected () | 
| int16_t | getStepCount () | 
| void | enableTapDetection (bool enable) | 
| bool | isTapDetected () | 
| void | getNextTap () | 
| void | lock () | 
| void | unlock () | 
| void | waitForResponse () | 
| void | proceed () | 
| void | setResults (uint8_t *buf, int length) | 
| void | processResponse () | 
| CurieImu | ( | int | subplatform_offset = 512 | ) | 
Instantiates a CurieImu object
| subplatformoffset | Subplatform offset | 
| void updateAccel | ( | ) | 
Updates the latest accelerometer readings by calling Firmata

| void updateGyro | ( | ) | 
Updates the latest gyroscope readings by calling Firmata

| void updateMotion | ( | ) | 
Updates the both the latest accelerometer & gyroscope readings by calling Firmata

| int16_t * getAccel | ( | ) | 
Returns last accelerometer reading X, Y, and Z axis
| int16_t getAccelX | ( | ) | 
Returns last accelerometer reading X axis
| int16_t getAccelY | ( | ) | 
Returns last accelerometer reading Y axis
| int16_t getAccelZ | ( | ) | 
Returns last accelerometer reading Z axis
| int16_t * getGyro | ( | ) | 
Read gyroscope X, Y, and Z axis
| int16_t getGyroX | ( | ) | 
Returns last gyroscope reading X axis
| int16_t getGyroY | ( | ) | 
Returns last gyroscope reading Y axis
| int16_t getGyroZ | ( | ) | 
Returns last gyroscope reading Z axis
| int16_t getTemperature | ( | void | ) | 
Reads the internal temperature

| int16_t * getMotion | ( | ) | 
Reads the X, Y, and Z axis of both gyroscope and accelerometer
| int16_t getAxis | ( | ) | 
Returns last shock or tap axis reading
| int16_t getDirection | ( | ) | 
Returns last shock or tap direction reading
| void enableShockDetection | ( | bool | enable | ) | 
Turns shock detection notifications on/off
| enable | enables/disables notifications | 

| bool isShockDetected | ( | ) | 
Has there been a shock detected?
| void getNextShock | ( | ) | 
Gets shock detect data from queue. Then m_axis gets axis data, and m_direction gets direction data
| void enableStepCounter | ( | bool | enable | ) | 
Turns step counter notifications on/off
| enable | enables/disables notifications | 

| bool isStepDetected | ( | ) | 
Has there been a step detected?
| int16_t getStepCount | ( | ) | 
Gets step count data from queue
| void enableTapDetection | ( | bool | enable | ) | 
Turns tap detection notifications on/off
| enable | enables/disables notifications | 

| bool isTapDetected | ( | ) | 
Has there been a tap detected?
| void getNextTap | ( | ) | 
Gets tap detect data from queue. Then m_axis gets axis data, and m_direction gets direction data
| void lock | ( | ) | 
Locks responses from Firmata

| void unlock | ( | ) | 
Unlocks responses from Firmata

| void waitForResponse | ( | ) | 
Wait for a response from Firmata before proceeding

| void proceed | ( | ) | 
Proceed with original function call now that response from Firmata has been received
| 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 | 
| void processResponse | ( | ) | 
Processes asyncronous responses returned from Firmata
 1.8.6