Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: K64F_eCompass_LCD Hello_FXOS8700Q rtos_compass K64F_eCompass ... more
FXOS8700Q_acc Class Reference
MMA8451Q accelerometer example. More...
#include <FXOS8700Q.h>
Public Member Functions | |
| FXOS8700Q_acc (PinName sda, PinName scl, int addr) | |
| FXOS8700Q constructor. | |
| ~FXOS8700Q_acc () | |
| FXOS8700Q destructor. | |
Detailed Description
MMA8451Q accelerometer example.
#include "mbed.h" #include "FXOS8700Q.h" int main(void) { FXOS8700Q combo( A4, A5, FXOS8700Q_I2C_ADDRESS0); PwmOut rled(LED_RED); PwmOut gled(LED_GREEN); PwmOut bled(LED_BLUE); while (true) { rled1.0 - combo(acc.getAccX()); gled1.0 - combo(acc.getAccY()); bled1.0 - combo(acc.getAccZ()); wait(0.1); } }
Definition at line 70 of file FXOS8700Q.h.
Constructor & Destructor Documentation
| FXOS8700Q_acc | ( | PinName | sda, |
| PinName | scl, | ||
| int | addr | ||
| ) |
FXOS8700Q constructor.
- Parameters:
-
sda SDA pin sdl SCL pin addr addr of the I2C peripheral
Definition at line 25 of file FXOS8700Q.cpp.
| ~FXOS8700Q_acc | ( | ) |
FXOS8700Q destructor.
Definition at line 45 of file FXOS8700Q.cpp.
Generated on Tue Jul 12 2022 21:37:22 by
1.7.2
FXOS8700Q Accelerometer / Magnetometer
Freescale Multi-Sensor (Multi-B) Shield