GLCD Touch Screen Example - Keypad 4D uLCD-32PTU

Use this section to discuss your embedded Flowcode projects.
Post Reply
jay_dee
Posts: 130
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 46 times
Been thanked: 29 times

GLCD Touch Screen Example - Keypad 4D uLCD-32PTU

Post by jay_dee »

Just sharing a basic working example of the using the Touch Screen of the 4D Systems uLCD 32PTU as a Keypad for inputing user data.
I needed to allow the user to input some values, this example is visually pretty crude but works well in hardware. Not all keys are enabled and I currently only use it for Positive integers but its a starting point for anyone interested in using the touch screen.

Each key press builds a text string, this is converted to a number.
'OK' return this numeric value to the main loop. 'Exit' returns 0.

Known issues.
* # . key do nothing at this time.
There is no sign key '-' as I did not need one.
Uses the gLCD_4D_v2_Picaso1 component so the 4D screen is run as a serial device (Not running a VIS-GINIE program )
If you simulate the Baud rate of the component reverts to 4800 and need changing back to the hardware Baud rate of your screen.
I needed to use the 4D software to revert my uLCD to serial mode and changed the Baud rate to 19200.
I disabled the HighSpeed as this did not work in my example but I did not look the issue in any detail.
KeyPad.jpg
KeyPad.jpg (98.2 KiB) Viewed 864 times
Cheers, J.
4D_uLCD-32PTU_TOUCH_KeyPad_Demo.fcfx
(58.3 KiB) Downloaded 68 times

BenR
Matrix Staff
Posts: 1726
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 438 times
Been thanked: 602 times

Re: GLCD Touch Screen Example - Keypad 4D uLCD-32PTU

Post by BenR »

Brilliant that's a great example and should be very useful many thanks for sharing.

Post Reply