Library Reference; Create Mcube_Mc36Xx Object; Initialize And Configure Sensor; Set Range - Mcube EV3672A Quick Start Manual

Mc3672 evaluation board
Table of Contents

Advertisement

MC3672 3-Axis Accelerometer

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.

4.5 SET RESOLUTION

Set the accelerometer resolution to 6, 7, 8, 10, 12 or 14 bit.
MC36XX_acc.SetResolutionCtrl(MC36XX_RESOLUTION_14BIT);
When the FIFO is enabled, the output of the FIFO is mapped to registers 0x02 to 0x07,
and the data has a maximum resolution of 12-bits
mCube Proprietary.
© 2020 mCube Inc. All rights reserved.
EV3672A/B Quick Start Guide and Demo
.
APS-045-0017v1.5
12 / 21

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ev3672b

Table of Contents