Skip to content

TheSpaceDragon/rdv-gy521

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rdv-gy521 Library

An Arduino library to simplify reading values from the GY-521 gyroscope, accelerometer, and temperature sensor. Shortens code and makes it much more readable. Get raw sensor values or processed data in SI units (m/s^2, degrees, celsius) with simple to use functions!

Jump To

Available Functions

Here are the available functions and their purposes.

  • sensor_init()
     Initializes device for communication. Absolutely crucial to initialize the device in the void setup() function.
  • get_raw_accel_x()
     Returns acceleration value in the x-axis as measured by the sensor.
  • get_raw_accel_y()
     Returns acceleration value in the y-axis as measured by the sensor.
  • get_raw_accel_z()
     Returns acceleration value in the z-axis as measured by the sensor.
  • get_accel_x()
     Returns acceleration in the x-axis in m/s^2.
  • get_accel_y()
     Returns acceleration in the y-axis in m/s^2.
  • get_accel_z()
     Returns acceleration in the z-axis in m/s^2.
  • get_raw_gyro_x()
     Returns value of rotation in the x-axis as measured by the sensor.
  • get_raw_gyro_y()
     Returns value of rotation in the y-axis as measured by the sensor.
  • get_raw_gyro_z()
     Returns value of rotation in the z-axis as measured by the sensor.
  • get_gyro_x()
     Returns angle of rotation in the x-axis in degrees.
  • get_gyro_y()
     Returns angle of rotation in the y-axis in degrees.
  • get_gyro_z()
     Returns angle of rotation in the z-axis in degrees.
  • get_temperature()
     Returns temperature at the sensor in degrees celsius.

Installation

There are two ways to install this library.

1. Library Manager

  •   Launch the Arduino IDE
  •   Navigate to Tools > Manage Libraries...
  •   Search for "rdv-gy521" in the query bar.
  •   Install the latest version of the library

    Screen Shot 2022-08-26 at 3 02 00 PM

2. .ZIP File

  •   Download this repository as a .ZIP file
  •   Launch the Arduino IDE
  •   Navigate to Sketch > Include Library > Add .ZIP library
  •   Find .ZIP file on the Finder menu and select choose

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages