EasyManua.ls Logo

Mcube MC3419 - Load the Demo

Mcube MC3419
20 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MC3419 3-Axis Accelerometer EV3419A Quick Start Guide and Demo
mCube Proprietary. APS-045-0033v1.0 9 / 20
© 2020 mCube Inc. All rights reserved.
3.2 LOAD THE DEMO
Open File->Examples->MC34X9-> MC34X9_demo and upload to your Arduino while it is wired
to the sensor.
If you need the sensor running on SPI, please configure the bus as SPI in the
MC34X9_demo.ino shown as below. Otherwise, the default is I2C bus.
/*** bSpi: I2C/SPI bus selection. SPI: 0, I2C: 1 ***/
const uint8_t bSpi = 1;
Setup I2C interface as 2.1 will get I2C address 0x4C.
Setup SPI interface as 2.2 will get SPI select pin 10.
/* Chip Select & Address */
uint8_t chipSelect = 0;
const uint8_t SPIChipSelectPin = 10; // SPI chipSelectPin
const uint8_t I2CAddress = 0x4c; // I2C address