Library for interfacing with NXP FXOS8700CQ accelerometer/magnetometer
Dependents: Stick_Runner Stick_Runner 2645_FXOS8700CQ_Library AccGyroTest ... more
FXOS8700CQ.h File Reference
@ brief FXOS8700CQ Library More...
Go to the source code of this file.
Detailed Description
@ brief FXOS8700CQ Library
#include "mbed.h" #include "FXOS8700CQ.h" // create object and specifiy pins FXOS8700CQ device(I2C_SDA,I2C_SCL); int main() { // call initialisation method device.init(); while (1) { // poll the sensor and get the values, storing in a struct Data values = device.get_values(); // print each struct member over serial printf("ax = %f ay = %f az = %f | mx = %f my = %f mz = %f\n" ,values.ax, values.ay, values.az ,values.mx, values.my, values.mz); wait(0.5); } }
Definition in file FXOS8700CQ.h.
Generated on Wed Jul 20 2022 01:09:31 by 1.7.2