LED Sand in a Box

Hello everyone,

i have tested a MPU6050 gyro sensor. And i decided to simulate some sand in a box.

I have used the following components:

MPU6050 gyro sensor

breadbord

arduino

32x8 led matrix

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Hardware

Aboth you can see the schematic, done with fritzing.

The led matrix is controlled by MAX7219 controllers. They are controlled by spi from the arduino.

The MPU6050 is controlled by I2C from arduino.

Step 2: Software

To control the MAX7219 controllers i used the LEDControl library, which you can find here:

https://github.com/wayoda/LedControl

You can find there some examples to use this library, too.

Some example code to control the MPU6050 i found here:

http://electronoobs.com/eng_arduino_tut5.php

The remaing stuff are cases for different angles of the MPU6050. You can find them at the end of the file gyro_sensor.ino. The util.ino includes a little framwork to draw pixels in the led matrix.

If you have questions, dont hesitate to ask me :).



Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    Discussions

    0
    None
    Marcs193

    Question 6 months ago on Introduction

    how do i need to change the code for it to be used on AN 16X16 led MATRIX?