LED Sand in a Box

Introduction: 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

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 :).



Share

    Recommendations

    • Water Contest

      Water Contest
    • Fix It! Contest

      Fix It! Contest
    • Metalworking Contest

      Metalworking Contest

    Discussions