mille-feuilleAutomatic Schematic Creation Tool

* Accelerometer Sensor *

step

Features

This I2C device board is not changeable I2C address. You can connect only one device on a mille-feuille.
Download datasheet

Main component : MMA8451Q - 3-axis, 14-bit/8-bit digital accelerometer

• 1.95 V to 3.6 V supply voltage
• 1.6 V to 3.6 V interface voltage
• ±2 g/±4 g/±8 g dynamically selectable full scale
• Output data rates (ODR) from 1.56 Hz to 800 Hz
• 99 μg/√Hz noise
• 14-bit and 8-bit digital output
• I2C digital output interface (operates to 2.25 MHz with 4.7 kΩ pullup)
• Two programmable interrupt pins for seven interrupt sources
• Three embedded channels of motion detection
  — Freefall or motion detection: one channel
  — Pulse detection: one channel
  — Jolt detection: one channel
• Orientation (portrait/landscape) detection with programmable hysteresis
• Automatic ODR change for auto-wake and return to sleep
• 32-sample FIFO
• High-pass filter data available per sample and through the FIFO
• Self-test
• Current consumption: 6 μA to 165 μA

step

Programming

Sample program
AccTest.py
* functions *
import Accelerometer

def getInfo(Number) : Getting hardware information of device board
Number : connector number of baseboard

def init() : Initializing device.
return : device ID

def get_X() :Reading X axis data
def get_Y() :Reading Y axis data
def get_Z() :Reading Z axis data


Example:
ID = Accelerometer.init()
accX = Accelerometer.get_X()
accY = Accelerometer.get_Y()
accZ = Accelerometer.get_Z()