FINAL VERSION
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 Thu Jul 14 2022 01:22:29 by 1.7.2