junwatu / LCD4884

Library fork for LCD 4884

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LCD4884

Library for LCD4884 shield - Arduino

How to use it

Please consider starting to write down your information in the header, like in the example.
Now, complete the body of functions declared at the bottom with your desired content.
When you choose the entry in the menu, this content will be executed.

To initialize the Class:

lcd.initClass(projectName, NUM_MENU_ITEM)

To show the menu on the screen:

lcd.showMenu(menuList)

To browse menu with the buttons:

lcd.browseMenu(menuList, menuFunction)

Access to Methods

You can use also these methods:

turnBacklightOn(true / false)
writeString(posX, posY, const char*, MENU_NORMAL / MENU_HIGHLIGHT)
writeStringBig(posX, posY, const char*, MENU_NORMAL / MENU_HIGHLIGHT)
writeChar(posX, posY, char, MENU_NORMAL / MENU_HIGHLIGHT)
writeCharBig(posX, posY, char, MENU_NORMAL / MENU_HIGHLIGHT)
clear(void)
init(void) (to initialize the screen without menu or buttons operation)

Notes

  • With this configuration, you have the Name of your project written centered at the top of the screen, and access to 4 submenus.
  • Wanna use a long press on CENTER_KEY ? Use the return value (bool) of getLongPress() to reach the status of last pression.
  • Wanna use the status of joystick's buttons in your own code ? Compare the return value int(analogRead(0))) with LEFT_K_A , CENTER_K_A , DOWN_K_A , RIGHT_K_A , UP_K_A , K_RELEAS_A , the analogic values returned by the joystick. But careful ! The analogic value read for a position can be a bit different than the one behind the MACRO...

About

Library fork for LCD 4884


Languages

Language:C++ 65.1%Language:C 34.9%