Introduction: Digital Spirit Level

Picture of Digital Spirit Level

The project consists of an MPU6050 IMU reading values for pitch and roll, and an Arduino Uno communicating the modified values over serial to the µLCD-32PTUPicaso Display. The 4D Display updates the values using LED digits showing angles in each axis for degrees, and gauges to represent the magnitude of offset. The MPU6050 IMU communicates its reading to the Arduino using I2C.

Step 1: How It Works

Picture of How It Works

Step 2: Build

Picture of Build

Components

  1. Arduino UNO
  2. MPU6050 IMU
  3. gen4-uLCD-28DT
  4. uSD card
  5. gen4 Interface board
  6. small breadboard
  7. jumper wires

Clarification for the component

  • If you are using gen4-IB and μUSB PA-5, connect the display to your computer as shown in the second image above
  • If you are using gen4-PA board,connect the display to your computer as shown in the third image above.

Connect the components as in the Fritzing Diagram. (first image)

Step 3: Program

  1. Download the project code here.
  2. Open the code using 4D workshop.
  3. Click on the Compile button.
  4. Connect the display to the PC using μUSB-PA5 and a mini USB cable. Make sure that you are connected to the right port. Red Button indicates that the device is not connected, Blue Button indicates that the device is connected to the right port.
  5. Now click on the “Comp’nLoad” button.
  6. Workshop 4 will prompt you to select a drive to copy the image files to a μSD Card. After selecting the correct drive, click OK.
  7. The module will prompt you to insert the μSD card.
  8. Click the Verify button to compile the sketch and check if there are no errors.
  9. Then, click the Upload button to load the sketch into your Arduino board. Make sure that you selected the corresponding board and you are connected to the right port.
  10. After this, you can now test and use your Digital Spirit Level

Step 4: Demonstration

Picture of Demonstration

On a Flat Surface, image 1

Roll to the Right, image 2

Pitch Up, image 3

Pitch Down, image 4,

Comments

grayl (author)2017-04-21

Codeless??

aalag (author)grayl2017-04-22

This project has its code included in this instructables. Take a look at step 3 :) . They have the Arduino sketch for the Arduino board and the Visi-Genie Project

And yep, the Visi-Genie file is a codeless program, which you can drag and drop any widgets then control them by using the Events and object inspector :) These widgets can be also controlled by Arduino host using the genieArduino library. Try it :)

About This Instructable

1,063views

18favorites

License:

Bio: 4D Makers is a group of curious engineers and enthusiasts who finds great satisfaction in creating and building anything from electronics.
More by 4D Makers:Arlo: Motion Sensing Robot Featuring 4Duino-24 and ULCDDrum PadWater Level Sensor
Add instructable to: