Brazil Scientific Mobility Program Summer '15
2015.08.15 23:26

Touch Screen Mini Calculator

Views 3362 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print Attachment
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print Attachment



Touch Screen Mini - Calculator by Eduardo M. Iwasaki


-Introduction


My project consist in construct a calculator using a microcontroller - Nucleo F401RE (Figure 1), a TFT Touch Screen (Figure 2) and the mbed library.


iwasaki_fig1.jpgiwasaki_fig2.jpg

          Figure 1. Nucleo F410RE                         Figure 2. TFT Touch Screen Shield


Microcontrollers are small computers that have memory, processor and programmable input/output peripherals. They are embedded in others devices and can be programmable for a specific work, because of this they are used in many products like equipment for home automation, industrial machines, computers and many others things.

In this project I am using the microcontroller Nucleo F401RE because of its versatile, low cost and portability. And together with the touch screen, they have many possibilities. For example, is possible to do some games like snake, make a keyboard like in your cell phone, do a GPS or create something totally new.

Among many possibilities I decided start with a calculator, because of the time and the concept of a calculator be something not too hard. Therefore I can focus my research more in how to integrate the Touch screen with the microcontroller , for in the future construct many others things and improve this calculator.

The calculator that I was build work as an ordinary one that receive the number from the user and make simple math operations like add, subtraction, multiplication and division.


-Method


1. Check if the microcontroller and the touch screen were working. And for this I made some tests using codes available in the site of mbed, which consisted in display images and text. Besides, at the same time that I tested the device, I could understand better the mbed library.

2. Create a layout of the calculator. For this part I used the mbed library and calculate the positions to display rectangles, to demarcate the area of each button and display the numbers and symbols for the user know where their need to touch for get what their want.

3. The third phase was the hardest one, that part consisted in calibrate the touchscreen. This part is very important because if the localization of the touch was not correct doesn't matter if the programming is correctly or with the display is good, nothing will work, one time that the correct number or operator is not recognize.

For calibrate the Touch screen was necessary know which pixel correspond to each position on the screen. And use this positions for make the calculator know which button was touched by the user. But for discover this pixels was necessary used a function in the mbed library, and after debug the information in a terminal, on the computer. After make some calculus for get the positions and enter with this information in the code responsible to calibrate the touch screen calibrate. And after the calibration the touch screen work as desire, as you can see in Figure 3.


iwasaki_fig3.jpg

Figure 3. Calculator answering to touch on the button 1


4. The fourth phase consisted in create the code in C++, that make the microcontroller work as a calculator (receive number and make the math operations). This part was made in an online compiler in the site mbed.com. The code was constructed using cases for each button. For example if a number was touched, the system need to recognize this number and put in a variable and keep

doing this until a math operator be press, so in this form is possible to get the numbers with units, tens, hundreds and more.


In the case of one math operator has be selected the program will make the operation and wait for the next number and this will continue until the button equal be selected.


5. The calculator was done (Figure 4).


iwasaki_fig4.jpg

Figure 5. Calculator finished, doing some division


(Click poster to enlarge)



eiwasaki.jpg




  1. Implementation of Software Defined Radio

    Your browser does not support the video tag. Implementation of Software Defined Radio The evolution of the mobile technology happens every day. While first cellphones designed were restricted to making calls and barely ...
    Date2015.08.18 CategoryBrazil Scientific Mobility Program Summer '15 Views32346
    Read More
  2. Real-Time Automated Target Tracking System

    Your browser does not support the video tag. The Real-time Automated Target Tracking System system presents a tracking system that performs several algorithms to complete one final task: Shoot an incoming helicopter. The system...
    Date2015.08.17 CategoryBrazil Scientific Mobility Program Summer '15 Views142125
    Read More
  3. Automated Sorting Machine using Video Processing and a Robotic Arm

    Your browser does not support the video tag. Automated Sorting Machine using Video Processing and a Robotic Arm Most manufacturing firms nowadays are looking for the automation of their systems, in other words, they want t...
    Date2015.08.17 CategoryBrazil Scientific Mobility Program Summer '15 Views82237
    Read More
  4. Portable Wireless Health Monitoring System

    Your browser does not support the video tag. Portable Wireless Health Monitoring System by Eliza Amancio Heart disease is the number one global cause of death for both men and women and a common issue is the de...
    Date2015.08.16 CategoryBrazil Scientific Mobility Program Summer '15 Views11288
    Read More
  5. Digital Equalizer on FPGA

    Your browser does not support the video tag. Digital Equalizer on FPGA by Thales De Lima Beraldo Audio digital signal processing is the intentional modification of the digital signals. Advanced digital signal p...
    Date2015.08.16 CategoryBrazil Scientific Mobility Program Summer '15 Views21446
    Read More
  6. Real-Time Embedded Audio Signal System

    Your browser does not support the video tag. Real-Time Embedded Audio Signal System by William Jamir Silva [Abstract] Audio digital signal processing is the intentional modification of the digi...
    Date2015.08.16 CategoryBrazil Scientific Mobility Program Summer '15 Views148657
    Read More
  7. Touch Screen Mini Calculator

    Your browser does not support the video tag. Touch Screen Mini - Calculator by Eduardo M. Iwasaki -Introduction My project consist in construct a calculator using a microcontroller...
    Date2015.08.15 CategoryBrazil Scientific Mobility Program Summer '15 Views3362
    Read More
Board Pagination Prev 1 Next
/ 1