

Voltage should not exceed power supply (e.g. Logic Levels - The MMA8452Q is a 3.3V device, so if you're using a 5V microcontroller (like the Arduino) you'll have to pay attention to the logic levels!īi-directional data line.Accelerometer Buying Guide - If you're not sure which accelerometer is best for you, check out this guide.I 2C - An introduction to the communication protocol we'll use to get our Arduino to talk to the MMA8452Q.Accelerometer Basics - This is a great primer on accelerometers - how they work, and why they're used.Suggested Readingīefore continuing on with this tutorial, we recommend you be somewhat familiar with the concepts in these tutorials: If you're using a breadboard to hook it up, we recommend straight male headers. A breadboard and jumper wires are always an easy combo.įinally, you'll need to solder a connector onto the MMA8452Q breakout. You'll also need some sort of interconnect between the breakout and Arduino. 330Ω Resistors - Assuming you're using a 5V-based microcontroller, these will help protect the MMA8452Q from out-of-spec voltages hitting its pins.


Arduino Board - You should be able to use any Arduino board you have handy - Arduino Uno, RedBoard, Pro, Mega.MMA8452Q Breakout Board - This is a good place to start (unless you plan on dead-bugging the tiny IC itself.To follow along with this tutorial, the most unique components you'll need are: On this page we'll show off an example sketch using the library and demonstrate how to use the library on your own to control the accelerometer. Example Code - We've written an Arduino library to help make your Arduino sketch cleaner and easier to write.This hardware hookup is used in the next section. Example Hookup - How to connect the MMA8452Q to the ubiquitous Arduino.Hardware Overview - An overview of the MMA8452Q IC itself, and the breakout board we've stuffed it onto.It's split into a handful of pages to explain how the board works and how to use it: This tutorial aims to get you started up with the MMA8452Q as quickly as possible. It's a digital sensor - communicating over an I 2C interface - so you'll get reliable, noise-free data using as few as two microcontroller pins to interact with the accelerometer. It sports features like orientation detection, single and double-tap sensing, and low power modes. It supports three, selectable sensing ranges: ± 2g, 4g, or 8g. The MMA8452Q is just a solid 3-axis accelerometer.
