Skip to content

A project bundle demonstrating how to use an MPU-6050 accelerometer and gyroscope sensor.

License

Notifications You must be signed in to change notification settings

Temetra/GY521StarterKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GY-521/MPU-6050 Starter Kit

Arduino .net Godot Licence

A project bundle demonstrating how to use an MPU-6050 accelerometer and gyroscope sensor.

AboutRequirementsInstallationReport Bugs

About this project

This is a collection of projects demonstrating how to use data from a GY-521 breakout board in an external program.

It's intended to be a minimal-code example using the Digital Motion Processor (DMP) functionality available in the I2C Device Library.

More information about MPU-6050/GY-521 can be found on Arduino Playground.

Video showing a prism being rotated by the sensor

Requirements

Installation

  • Download the i2cdevlib repository.
  • From the Arduino folder, copy I2Cdev and MPU6050 into your Arduino IDE libraries folder.
  • Open the Arduino GY521Server project, and upload to your device.

Ensure that the SDA (data) and SCL (clock) pins of the breakout board are connected to the appropriate pins on the Arduino. For Uno, these are A4 (SDA) and A5 (SCL). For Leonardo, use pins 2 (SDA) and 3 (SCL).

Usage

The project uses a baud rate of 19200 by default. Each set of Euler angles are given in radians as follows:

@ <psi> <theta> <phi>\r\n

This is an example of serial monitor output:

Starting
Ready
@ -0.10 0.01 -0.03
@ -0.08 0.00 -0.02
@ -0.06 0.00 -0.02
@ -0.04 -0.00 -0.02
@ -0.02 -0.00 -0.01
@ 0.02 -0.01 -0.01
@ 0.04 -0.02 -0.00
@ 0.07 -0.02 0.00

About

A project bundle demonstrating how to use an MPU-6050 accelerometer and gyroscope sensor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published