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.
Dependencies: FXOS8700Q MotionSensor
Dependents: GPS_6Axis_DataLogger_SD_UDP
Fork of FXOS8700Q by
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 Sat Jul 30 2022 14:10:45 by
 1.7.2 
    