Go Down

Topic: GEM (Good Enough Menu) Library (Read 1 time) previous topic - next topic


Hi everyone!

I wrote just another library for creation of graphic multi-level menu (ain't there plenty of them already?): GEM. It's good enough for me, so might as well be useful to somebody else=)

Features editable menu items (of `int`, `byte`, `boolean`, `char[17]` data types) and option selects.

User-defined callback function can be specified to invoke when menu item is saved. Supports buttons that can invoke user-defined actions and create action-specific context, which can have its own enter (setup) and exit callbacks as well as loop function.

Requires AltSerialGraphicLCD library by Jon Green. LCD screen must be equipped with SparkFun Graphic LCD Serial Backpack and properly set up to operate using firmware provided with aforementioned library.

So, yeah, that may sound limiting, but in fact it yields a quite welcome outcome: using only two wires to connect Arduino to graphic LCD (plus power and ground) is a must in projects with tight pin budget.

The library is provided with all necessary documentation and annotated examples, as well as Wiki section on GitHub that features additional guides for the supplied examples and How To's. Provided examples are also use my another library - KeyDetector (although it is not necessary, just making whole push-button presses detection thing a little easier).

Consider checking it out, may be it will be of some use to you eventually (especially if you happen to have some SparkFun's Serial Backpacks on your hands;) ).



I can almost always find at least some minor issue with a library after a quick glance. I looked GEM over the other day when you submitted the Library Manager request and found not a one! I'm always very impressed when I see people make the effort to add some good documentation since I see a lot of libraries with little or none.

Thanks for your contribution to the Arduino community!


pert Wow, thank you for your high evaluation of the work done! I just really tried to document and present everything in a way that I would be happy to read myself. I've come from the web-development, and I appreciate good-written documentation as much as the value of the project itself, no matter how big or small it is.


Hey there!

Just updated GEM to support U8g2 library for all graphics heavy lifting.

Short rundown of updates:

  • Support for U8g2 library via `GEM_u8g2` class;
  • Code cleanup (both AltSerialGraphicLCD and U8g2 versions);
  • Basic Cyrillic support for U8g2 version (`enableCyrillic()` method) with additional example sketch;
  • New `reInit()` method to help reset display before returning from user-defined context;
  • Readme updates to include walkthrough guide on "How to use U8g2 version" and updated Reference section.
  • Updated wiki with Initial setup guide, Test bench wiring for U8g2-based example sketches and How-to's.

Updates available since release 1.1.0.


Hey there!

Finally added to GEM support for floating-point variables of `float` and `double` types.

Short rundown of updates:

  • Optional support for editable variables of type `float` and `double`;
  • Enabled by default - can be disabled by editing `config.h` file to save some considerable amount of program storage space (up to 10% on UNO);
  • New section in Readme for implementation specifics;
  • New methods `GEMItem::setTitle()` and `GEMItem::getTitle()` to dynamically change title of menu items (e.g. Buttons).

Updates available in release 1.2.1.

Go Up