Library Reference - Mcube MC3672 Quick Start Manuals

Accelerometer driver
Table of Contents

Advertisement

MC3672 Accelerometer Driver

4 LIBRARY REFERENCE

4.1 CREATE MCUBE_MC36XX OBJECT
You can create the MCUBE_MC36XX object with:
MC36XX MC36XX_acc = MC36XX();
4.2 INITIALIZE AND CONFIGURE SENSOR
Initialize and configure the sensor with:
MC36XX_acc.start();
Wake up sensor with your own configuration, it will follow the factory default setting:
MC36XX_acc.wake();
Stop sensor to change setting:
MC36XX_acc.stop();
Set sensor as sniff mode:
MC36XX_acc.sniff ();
4.3 SET RANGE
Set the accelerometer max range to ±2g, ±4g, ±8g or ±16g with:
MC36XX_acc.SetRangeCtrl(MC36XX_RANGE_8G);
4.4 READ RANGE
Read the current range with:
MC36XX_acc.GetRangeCtrl();
It returns: 0 for ±2g, | 1 for ±4g, | 2 for ±8g | 3 for ±16g.
mCube Proprietary.
© 2018 mCube Inc. All rights reserved.
APS-045-0017v1.2
Quick Start Guide and Demo
11 / 19

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Mcube MC3672

Table of Contents