Project tutorial
Digital Level

Digital Level

The project consists of reading values for pitch and roll, and communicating the modified values over serial to the display.

  • 2,740 views
  • 3 comments
  • 8 respects

Components and supplies

About this project

Project

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.

How it works

Step 1: Build

Connect the components as in the Fritzing diagram.

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

Step 2: Program

  • Download the project file here.
  • Open the code using 4D workshop.

Step 3: Compile

  • Click on the Compile button.

Note: This step could be skipped. However, compiling is essential for debugging purposes.

Step 4: Comp’n Load

  • 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.
  • Now click on the “Comp’nLoad” button.
  • 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.

Step 5: Mount μSD Card

  • The module will prompt you to insert the μSD card.
  • Properly unmount the μSD Card from the PC and insert it to the μSD Card slot of the display module. The image below must appear on your display after completing the steps above.

Step 6: Upload Arduino Sketch

  • Open the Arduino Sketch with Arduino IDE.
  • Click the Verify button to compile the sketch and check if there are no errors.
  • 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.
  • After this, you can now test and use your Digital Spirit Level.

Demonstration

On a Flat Surface

Roll to the Right

Pitch Up

Pitch Down

Schematics

Connections
Schematic lfb0f175m5

Comments

Similar projects you might like

Level Platform Using Accelerometer

Project tutorial by Mark Tashiro

  • 16,967 views
  • 15 comments
  • 29 respects

Project Jennifer: A Digital Inclinometer

Project tutorial by Muntadhar Haydar

  • 1,011 views
  • 2 comments
  • 7 respects

Complete Digital Clock Including Alarm and Motion Sensor

Project tutorial by LAGSILVA

  • 12,682 views
  • 11 comments
  • 50 respects

Digital And Binary Clock With Two LED Matrix And RTC

Project tutorial by LAGSILVA

  • 6,117 views
  • 10 comments
  • 27 respects

Arduino Digital Dice

Project tutorial by xXarduino_11Xx

  • 1,407 views
  • 5 comments
  • 8 respects

Simple Arduino Digital Clock Without RTC

Project in progress by Annlee Fores

  • 96,170 views
  • 23 comments
  • 80 respects
Add projectSign up / Login