Calculator

by 4D Makers in Circuits > Arduino

809 Views, 1 Favorites, 0 Comments

Calculator

calcula-800x666.png

In this project, we will use a gen4 uLCD-28DT and make use of the integer calculation and floating point emulation capabilities of the 4D Diablo processor. With that module we can make a calculator! We can enter the numbers using the touchpad and display the result on the LCD display.

How It Works

^FFFB7F12BB062969458E04CEE761666292896380AB61B5138B^pimgpsh_fullsize_distr.png

*This is how the system works

Build

gen4_1-300x138.png
gen4_2-300x149.png

Components

  1. gen4-uLCD-28DT
  2. micro SD Card
  3. gen4-PA or USB PA-5
  4. USB A to mini cable

Clarification about the components:

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

Program

Download the project file here.

  1. You can download Workshop 4 IDE and the complete code for this project from our website.
  2. Open the project using Workshop 4. This project uses the ViSi Environment.
  3. You can modify the properties of each widget.
  4. Click on the Compile button.
  5. 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.
  6. Now click on the “Comp’nLoad” button.
  7. 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.
  8. The module will prompt you to insert the μSD card.

Properly unmounted the μSD Card from the PC and insert it to the μSD Card slot of the display module. The image on the demonstration must appear on your display after completing the steps above.

Demonstration

calc_2-179x300.png
multiply-210x300.png
product_1-215x300.png
product_2-1-194x300.png
product-201x300.png