Articles Hierarchy

Articles Home » Arduino Projects » TOUCH LCD menu remix

TOUCH LCD menu remix

about 2 years ago i used a
Arduino MEGA with a Arduino MEGA LCD shield and a LCD touchscreen
for a project about electric power monitor here, download from here as a kind of local operator station.
here now i want just revise it as a template TOUCH LCD Terminal
details:
LCD: 3.2" TFT 400 * 240 "ZE HAO" ( incl. a SD card holder ) wiki
ITDB02 Arduino MEGA shield 2.1 ITEAD STUDIO ( newer version combines both see here )
where i solder 3 wires on GND, TX1 (18) , RX1 (19) to connect a other arduino by TTY

kind of bulky compared to a today smart phone

The software features a intro page, a bottom menu (4 button) and a right menu (7 button)
and is based on a old version of the USB menu. EMON and OSCI we now here not need,
only what we are interested in is the Terminal function,
and the touch screen input functions by the NUM KEY PAD and QWERTY KEYBOARD.

but this all not describe the HMI operation concept / options of this project.
example TOUCH INPUT:
- if the board is in stand alone ( powered by 5VDC USB plug or 9VDC plug ) there can be a menu button calling that touch input. ( on (touch)[enter] the keyboard is closed and the input is processed )
- if the board is connected by USB cable from PC ( power and terminal function )
the USB menu ( shown by USB: [space][enter] ) has a entry ( here 4 or 5 ) to call the touch input and bring back the resulting input after (touch)[enter]. pls find the INPUT: HALLO WORLD in LCD QWERTY and USB MENU

and further more, if via T1 a other arduino is connected ( at D0 / D1 ) and that has loaded also a USB terminal menu, ( but USB there not connected ) a menu operation of that second arduino can be coded using LCD menu buttons and TOUCH keyboard inputs.
( like i did for EMON functions menu oscilloscope and FFT.. )


- work with Arduino IDE 1.0.6 ( and still using the old code "powermeter_touchscreen_V25" )
- first want update the henning karlsen libraries
screen looks good, touch need new /transfer of/ calibration;
UTouchCD.h//#define CAL_X 0x00378F66UL
//#define CAL_Y 0x03C34155UL
//#define CAL_S 0x000EF13FUL

// KLL
#define CAL_X 0x00514F8EUL
#define CAL_Y 0x0050CEB2UL
#define CAL_S 0x000EF18FUL

- now copy LCD functions to latest (rev 2.8) USB menu version
file / TAB MEGA_touchLCD.ino // old functions, need to delete EMON features, need to add variables and settings from main.
file / TAB kll6464.c // my avatar/logo

The default screen is loaded drawmainscreen(); at startup by JOB 6
and that looks for TOUCH operation of menu.


in that situation i think i burned something, LCD work, touch not, no idea if it is the arduino or the LCD