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.
Cheers, J.
GLCD Touch Screen Example - Keypad 4D uLCD-32PTU
-
- Posts: 130
- http://meble-kuchenne.info.pl
- Joined: Sun Dec 20, 2020 6:06 pm
- Has thanked: 46 times
- Been thanked: 29 times
-
- Matrix Staff
- Posts: 1733
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 439 times
- Been thanked: 602 times
Re: GLCD Touch Screen Example - Keypad 4D uLCD-32PTU
Brilliant that's a great example and should be very useful many thanks for sharing.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel