Giter VIP home page Giter VIP logo

m5stacksam's Introduction

M5StackSAM

A simple to use library for creating an application menu on the M5Stack platform.

M5STACK FACES SUPPORT:

SUPPORT for M5STACK-FACES QWERTY keyboart
keyboardGetString(); - return String entered by keyboard
EXAMPLE:
	String tmpStr = "";
	tmpStr = MyMenu.keyboardGetString(); - write text and press ENTER (OK) on keyboard

LIST FUNCTIONS:

clearList(); - cler list buffer and settings
setListCaption("LIST - CAPTION"); - set list caption
addList("ITEM TEXT"); - add item to list
showList(); - show created list
nextList(); - select next item
getListID() - get ID of selected item as byte
getListString() - get ITEM TEXT of selected item as String

CHANGING COLOR SCHEMA:

setColorSchema(MENU_COLOR, WINDOW_COLOR, TEXT_COLO);
COLORS are uint16_t (RGB565 format).
getrgb(byte R, byte G, byte B); - CALCULATING RGB565 format

HERCULES MONITOR COLOR SCHEMA
setColorSchema(MyMenu.getrgb(0,0,0), MyMenu.getrgb(0,0,0), MyMenu.getrgb(0,255,0));

ADD MENU ITEM

 addMenuItem(SUBMENU_ID,MENU_TITTLE,BTN_A_TITTLE,BTN_B_TITTLE,BTN_C_TITTLE,SELECTOR,FUNCTION_NAME);
  SUBMENU_ID byte [0-7]: TOP MENU = 0, SUBMENUs = [1-7]
  SELECTOR
         IF SELECTOR = -1 then execute() run function with name in last parameter (FUNCTION_NAME)
         IF SELECTOR = [0-7] then execute() switch menu items to SUBMENU_ID
  FUNCTION_NAME: name of function to run....

OTHER

	show(); - Show/Resfresh actual menu position
	execute(); - run APP / Switch menu level
	up() - menu UP
	down() - menu DOWN
	drawAppMenu(APP_TITTLE,BTN_A_TITTLE,BTN_B_TITTLE,BTN_C_TITTLE); - Create and show app GUI template
	windowClr(); - clear menu window
	getrgb(byte R, byte G, byte B); - CALCULATING RGB565 format

REQUIRED:

	MSStack library: https://github.com/m5stack/M5Stack

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.