Giter Club home page Giter Club logo

arduinomenu's Introduction

ArduinoMenu 4

Generic menu/interactivity system for the arduino framework

License: LGPL-2.1+ Build Status Donate Join Gitter

Purpose

Full automated or user code driven navigation system. With this system you can define menus, submenus, input fields and other iteration objects that deal with all input/output and can call user defined handler as a result of user iteration. The user function can be operated as a single action called on click/enter or as a event driven function responding to focus In/Out or Enter/Esc events. The system is designed as a non blocking polling system, allowing concurrent task to run. Optionally the system can be operated in semi-automated mode, issuing navigation command from user code.

See the wiki

Simple Example

#include <menu.h>
#include <menuIO/serialOut.h>
#include <menuIO/chainStream.h>
#include <menuIO/serialIn.h>

using namespace Menu;

#define LEDPIN LED_BUILTIN
#define MAX_DEPTH 1

unsigned int timeOn=10;
unsigned int timeOff=90;

MENU(mainMenu, "Blink menu", Menu::doNothing, Menu::noEvent, Menu::wrapStyle
  ,FIELD(timeOn,"On","ms",0,1000,10,1, Menu::doNothing, Menu::noEvent, Menu::noStyle)
  ,FIELD(timeOff,"Off","ms",0,10000,10,1,Menu::doNothing, Menu::noEvent, Menu::noStyle)
  ,EXIT("<Back")
);

serialIn serial(Serial);
MENU_INPUTS(in,&serial);

MENU_OUTPUTS(out,MAX_DEPTH
  ,SERIAL_OUT(Serial)
  ,NONE//must have 2 items at least
);

NAVROOT(nav,mainMenu,MAX_DEPTH,in,out);

void setup() {
  pinMode(LEDPIN, OUTPUT);
  Serial.begin(115200);
  while(!Serial);
  Serial.println("Menu 4.x");
  Serial.println("Use keys + - * /");
  Serial.println("to control the menu navigation");
}

bool blink(int timeOn,int timeOff) {return millis()%(unsigned long)(timeOn+timeOff)<(unsigned long)timeOn;}

void loop() {
  nav.poll();
  digitalWrite(LEDPIN, blink(timeOn,timeOff));
}

Features

  • Small footprint on RAM using PROGMEM on system where it is available.
  • Wide variety of input/output devices supported.
  • Easy to define menus (macros).
  • Minimalistic user code base.
  • Fields edit values hooked to existing program variables (references).
  • Editing text fields with per character validation.
  • Fields can edit numeric variables of any type (templates).
  • Reflexive fields, showing variable changes done outside the menu system.
  • Numerical field edit and range validation.
  • Enumerated fields for numeric and non-numeric types
  • Customizable (colors and cursors).
  • Able to work over Serial stream IO as a base level.
  • Supports multiple inputs and outputs in parallel.
  • static allocation of RAM, avoiding heap fragmentation, all RAM needed to define menu structure is allocated at program startup.
  • events available for menus and prompts
  • simply returns when no input available and no needed to draw.
  • lazy drawing, only draws when changed, avoiding time consumption and flicking.
  • sync/async navigation API functions
  • async navigation for stateless clients (as web)
  • web interface (experimental)
  • can be confined to a display area (numeric fields can still overflow the area, user should take account for them)
  • Tested on Arduino AVR's & ARM, Teensy, ESP8266, Esp32, nRF52, STM32

Videos

IMAGE ALT TEXT IMAGE ALT TEXT IMAGE ALT TEXT IMAGE ALT TEXT

Plugins

Plugins are particular menu combinations or item customized behaviors and/or drawing.

Some plugins might be platform specific or require some hardware.

  • barField - displays a bar for numeric field on LCD
  • cancelField - allows to restore previous numeric value on escape.
  • SDMenu - full automated SD Card file picker, using standard Arduino SD lib.
  • SdFatMenu - full automated SD Card file picker, using standard SdFat (https://github.com/greiman/SdFat).

Applications

Some applications/tutorials using ArduinoMenu, (current and older versions).
Do you have another? please let me know on gitter or email me.

Arduino script for temperature sensor and timer. It allows to turn on heater and light accordingly to schedule
https://github.com/vikulin/LCD_LAT

Project-GlassKilnController electrically-heated kiln for making "Warm Glass"
https://arduinoinfo.mywikis.net/wiki/Project-GlassKilnController

ArduinoMenu demo TTGO T-Display awesome tutorial.
https://sites.google.com/site/jmaathuis/arduino/lilygo-ttgo-t-display-esp32/arduinomenu-demo-ttgo-t-display

mvc-interface ArduinoMenu tutorial
https://zaragozamakerspace.com/index.php/courses/mvc-interface/

Arduino Automatic Copper Tape Cutter
https://www.thingiverse.com/thing:3557719

Reloading powder hopper level gauge and alarm
https://github.com/nathandarnell/Reloading-Powder-Hopper-Level-Gauge-and-Alarm

ServoBox Servo tester & monitor
https://github.com/jarkman/ServoBox

PANOBOT A Panorama robot
https://github.com/RobertFach/panobot

teensy-midi-looper Microcontroller-based midi performance sequencer
https://github.com/newdigate/teensy-midi-looper

AmplifierControl Automate procedure to switch on/off amplifier and band decode of Kenwood
https://github.com/petrlab/AmplifierControl

spna An Arduino Single Port Network Analyzer (SPNA)
https://github.com/tczerwonka/spna

LRDuino In car multi gauge system - STM32, SSD1306, MAX31856, ADXL345, ELM327
https://github.com/BennehBoy/LRDuino

LRDuinoTD5 In car multi gauge system - STM32, SSD1306, MAX31856, ADXL345, L9637D, TD5 ECU
https://github.com/BennehBoy/LRDuinoTD5

thom-radio Internet radio build
https://github.com/evfool/thom-radio

MIDI_drums 7 chanel piezo MIDI drum box with menu on LCD
https://github.com/Sobollion/MIDI_drums

BalancingRobot
https://github.com/SLBarker/BalancingRobot

swatili 50l water meter with valve control, lcd, buttons, rtc and hall effect pulse reader
https://github.com/daniel-leonard-robinson/swatili

Fielduino hardware PWM generator using menu to select frequency and dutty.
https://github.com/neu-rah/Fielduino

ArduinoMultiDesktop MultiDesktop concept for hardware devices
https://github.com/dontsovcmc/ArduinoMultiDesktop

SmartGreenHouse
https://github.com/dontsovcmc/SmartGreenHouse/tree/master/src

console.arduino Portable serial debug console project using ILI9341
https://github.com/malachib/console.arduino

Platforms

Atmel AVR, Atmel SAM, Espressif 32, Espressif 8266, Intel ARC32, Microchip PIC32, Nordic nRF51, Nordic nRF52, ST STM32, Teensy, TI MSP430

Install

Arduino IDE - Install using the library manager (ArduinoMenu library - Rui Azevedo)

Platformio - http://platformio.org/lib/show/1468/ArduinoMenu%20library

IO devices

Output devices

Serial

https://www.arduino.cc/en/Reference/Serial

  • Serial monitor.

Standard arduino LCD library

https://www.arduino.cc/en/Reference/LiquidCrystal

  • hd44780

F Malpartida's LCDs

https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home

  • HD44780 direct
  • HD44780 I2C
  • HD44780 SPI

Matthias Hertel PCF8574 driver

https://github.com/mathertel/LiquidCrystal_PCF8574

  • HD44780

Arduino TFT devices

https://www.arduino.cc/en/Guide/TFT

SSD1306Ascii

https://github.com/greiman/SSD1306Ascii

  • OLED Screens based on SSD1306 controller

TFT_eSPI

An Arduino IDE compatible graphics and fonts library for ESP8266 and ESP32
https://github.com/Bodmer/TFT_eSPI

  • ILI9341, ILI9163, ST7735, S6D02A1, ILI9481, ILI9486, ILI9488, HX8357D, ST7789, ILI9486
  • Waveshare 2 and 3 colour SPI ePaper displays

TFT_HX8357 driver

https://github.com/Bodmer/TFT_HX8357

  • HX8357B, HX8357C, ILI9481 and ILI9486

Adafruit's GFX devices

https://github.com/adafruit/Adafruit-GFX-Library

  • RGBmatrixPanel, 16x32 and 32x32 RGB LED matrix panels.
  • Adafruit_TFTLCD, 2.8" TFT LCD touchscreen breakout and TFT Touch Shield for Arduino.
  • Adafruit_HX8340B, 2.2" TFT Display with microSD.
  • Adafruit_ST7735, 1.8" TFT Display with microSD.
  • Adafruit_PCD8544, for the Nokia 5110/3310 monochrome LCD.
  • Adafruit-Graphic-VFD-Display-Library, for 128x64 Graphic VFD.
  • Adafruit-SSD1331-OLED-Driver-Library-for-Arduino for the 0.96" 16-bit Color OLED w/microSD Holder.
  • Adafruit_SSD1306 for the Monochrome 128x64 and 128x32 OLEDs.

UTFT devices

http://www.rinkydinkelectronics.com/library.php?id=51

  • ITDB02 series - ITead Studio
  • TFT01 series - ElecFreaks
  • RGB LCD - NKC Electronics.

U8glib devices

https://github.com/olikraus/U8glib_Arduino

SSD1306, 128x64, SSD1306, 128x32, SSD1306, 64x48, SSD1309, 128x64, SSD1322, 256x64, SSD1325, 128x64, SSD1327, 96x96, SH1106, 128x64, UC1601, 128x32, UC1608, 240x64, UC1610, 160x104, UC1611, 240x64, UC1611, 240x128, UC1701, 128x64, UC1701, 102x64, ST7565, 128x64, ST7565, 128x32, ST7920, 128x64, ST7920, 192x32, ST7920, 202x32, LD7032, 60x32, PCD8544, 84x48, TLS8204 , 84x48, PCF8812 , 96x65, KS0108 , 128x64, T6963, 128x64, T6963, 128x128, T6963, 240x64, T6963, 240x128, SBN1661, 122x32, LC7981, 160x80, LC7981, 240x64, LC7981, 240x128, LC7981, 320x64, SSD1351, HT1632, 24x16, Flipdisk, 28x14, Virtual Screen Device

U8G2 and U8x8 devices

https://github.com/olikraus/U8g2_Arduino

SSD1305 128X32_NONAME, SSD1305 128X32_NONAME, SSD1305 128X64_ADAFRUIT, SSD1305 128X64_ADAFRUIT, SSD1306 128X64_NONAME, SSD1306 128X64_VCOMH0, SSD1306 128X64_ALT0, SSD1306 128X64_NONAME, SSD1306 128X64_VCOMH0, SSD1306 128X64_ALT0, SH1106 128X64_NONAME, SH1106 128X64_VCOMH0, SH1106 128X64_WINSTAR, SH1106 128X64_NONAME, SH1106 128X64_VCOMH0, SH1106 128X64_WINSTAR, SH1106 72X40_WISE, SH1106 72X40_WISE, SH1106 64X32, SH1106 64X32, SH1107 64X128, SH1107 64X128, SH1107 SEEED_96X96, SH1107 SEEED_96X96, SH1107 128X128, SH1107 128X128, SH1122 256X64, SH1122 256X64, SSD1306 128X32_UNIVISION, SSD1306 128X32_UNIVISION, SSD1306 64X48_ER, SSD1306 64X48_ER, SSD1306 48X64_WINSTAR, SSD1306 48X64_WINSTAR, SSD1306 64X32_NONAME, SSD1306 64X32_1F, SSD1306 64X32_NONAME, SSD1306 64X32_1F, SSD1306 96X16_ER, SSD1306 96X16_ER, SSD1309 128X64_NONAME2, SSD1309 128X64_NONAME2, SSD1309 128X64_NONAME0, SSD1309 128X64_NONAME0, SSD1325 NHD_128X64, SSD1325 NHD_128X64, SSD1326 ER_256X32, SSD1326 ER_256X32, SSD1327 SEEED_96X96, SSD1327 SEEED_96X96, SSD1327 MIDAS_128X128, SSD1327 MIDAS_128X128, SSD1329 128X96_NONAME, LD7032 60X32, LD7032 60X32, ST7920 192X32, ST7920 192X32, ST7920 192X32, ST7920 128X64, ST7920 128X64, ST7920 128X64, LS013B7DH03 128X128, UC1701 EA_DOGS102, UC1701 MINI12864, PCD8544 84X48, PCF8812 96X65, HX1230 96X68, UC1604 JLX19264, UC1604 JLX19264, UC1608 ERC24064, UC1608 ERC24064, UC1608 ERC240120, UC1608 ERC240120, UC1608 240X128, UC1608 240X128, UC1638 160X128, UC1610 EA_DOGXL160, UC1610 EA_DOGXL160, UC1611 EA_DOGM240, UC1611 EA_DOGM240, UC1611 EA_DOGXL240, UC1611 EA_DOGXL240, UC1611 EW50850, UC1611 EW50850, ST7565 EA_DOGM128, ST7565 64128N, ST7565 ZOLEN_128X64, ST7565 LM6059, ST7565 LX12864, ST7565 ERC12864, ST7565 NHD_C12864, ST7565 JLX12864, ST7565 NHD_C12832, UC1601 128X32, UC1601 128X32, ST7565 EA_DOGM132, ST7567 PI_132X64, ST7567 JLX12864, ST7567 ENH_DG128064, ST7567 ENH_DG128064I, ST7588 JLX12864, ST7588 JLX12864, ST75256 JLX256128, ST75256 JLX256128, ST75256 JLX256160, ST75256 JLX256160, ST75256 JLX240160, ST75256 JLX240160, ST75256 JLX25664, ST75256 JLX25664, ST75256 JLX172104, ST75256 JLX172104, NT7534 TG12864R, IST3020 ERC19264, SBN1661 122X32, SED1520 122X32, KS0108 128X64, KS0108 ERM19264, LC7981 160X80, LC7981 160X160, LC7981 240X128, T6963 240X128, T6963 240X64, T6963 256X64, T6963 128X64, SSD1322 NHD_256X64, SSD1322 NHD_128X64, SSD1606 172X72, SSD1607 200X200, SSD1607 GD_200X200, IL3820 296X128, IL3820 V2_296X128, SED1330 240X128, RA8835 NHD_240X128, RA8835 320X240, MAX7219 32X8, A2PRINTER 384X240

UCGLib devices

https://github.com/olikraus/Ucglib_Arduino

ST7735, ILI9163, ILI9325, ILI9341, ILI9486, LD50T6160, PCF8833, SEPS225, SSD1331, SSD1351, HX8352C

Serial ANSI terminal

https://github.com/neu-rah/AnsiStream

  • Unix terminal

Grove RGB LCD I2C 2x16

https://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/

Web browser

  • ESP8266 (builtin)

Web JSON

  • ESP8266 (builtin)

Websockets

  • ESP8266 (builtin)

note: esp8266 will require a streaming library even if not using web interface, along with #include <menuIO/esp8266Out.h>

depending on your output driver it may be one of (can install both)

Input devices

Serial https://www.arduino.cc/en/Reference/Serial

quadEncoder - Generic encoder using PCINT (builtin)

Buttons - simple digital keyboard (builtin)

Generic keyboard (no PCINT) - configurable for digital or analog keyboards (builtin)

Analog Joystick

ClickEncoder https://github.com/0xPIT/encoder

Matrix keypad
http://playground.arduino.cc/Code/Keypad https://github.com/Nullkraft/Keypad

PCF8574 based i2c matrix keypad https://github.com/whatnick/i2ckeypad

User defined input calling menu navigation API

Web browser (experimental) when using ESP devices

Dependencies

This library depends on the following libraries:

Depending on the type of input or output, other libraries might be needed. Essentially any library needed for your devices.

Limits

  • when using macros the menu is limited to 16 options (current macro limnit).
  • menus must have at least 2 options when built using macros.
  • maximum 127 options.
  • fast access (numeric keys) only supports 9 options (1 to 9)
  • prompts can overflow on panels with less than 4 characters width
  • menu system is character based, so choose monometric font to achieve best results, it will work with any font but the text can overflow.

Base

  • Character based information display.
  • Line based menu organization.
  • Stream IO + specializations.

info

more info at

wiki pages, issues or r-site.net

Errors / Sugestions

Please report errors, problems or enhancement ideas, I apreciate the feedback. Thanks.

On issues report please specify the input and output drivers or devices as well as target platform.

notes

encoder now needs begin() to be called on setup (2.x)

input is read from generic streams, included simple streams for encoders and keyboards - provided encoder driver uses internal pull-ups and reverse logic

multiple stream packing for input to mix encoder stream with encoder keyboard (usually 1 or 2 keys)

History

4.0

  • SdFat plugin and example
  • EscControl examle
  • support Bodmer/TFT_eSPI
  • SDCard file picker plugin
  • Allow virtual/dynamic data custom menus
  • alternative key driver with explicit pin modes
  • More examples
  • Text edit fields with validation *
  • Pad style menus (horizontal list)
  • inline pad menus can input custom formats like IP/Date/Time, experimental and just for devices that can position a cursor
  • Plugins, alternative menu items potentially device specific
  • Allow multiple concurrent menus
  • Support UCGLib displays
  • Support U8x8 displays
  • Support Arduino TFT
  • Support PCF8574 I2C LCD
  • Support Analog Joystick input
  • Added input burst config option
  • VALUEOBJ macro, user allocated values
  • menuIn class for menu inputs (allows device field invertion) *
  • some options have been distributed to some other classes
  • allow dynamic menu construction (ram) even for AVR's

* API changes

Options

invertFieldKeys option removed, invertion is now supported by specific menuIn objects.

regression: still needed to ease simple input cases.

numValueInput moved to menuIn object

navRoot extra options, previously on global options object

bool nav2D=false;//not used
bool canExit=true;//v4.0 moved from global options
bool useUpdateEvent=false;//if false, use enterEvent when field value is changed.
idx_t inputBurst=1;//limit of inputs that can be processed before output
Serial input

Serial is no longer accepted as an input directly, use serialIn instead

prompt base API

printTo member function changed from:

Used printTo(navRoot&,bool,menuOut&,idx_t,idx_t);

to

Used printTo(navRoot&,bool,menuOut&,idx_t,idx_t,idx_t=0);

this should only affect customized components

inputs are now from class menuIn, derived from Stream but including flag functions for field axis inversion per input class.

3.0

  • complete revision of menu control system
    • menu structure separated in ram objects and flash objects
    • using separate navigation control objects navNode
    • central navigation control object navRoot
    • using event for all menu objects (focus, blur, enter, exit).
    • multiple panels
    • color enumeration at base level
    • multiple output devices in parallel
    • define exit as regular option
    • limiting text width to prevent overflow

2.4

  • support for teensy (tested on 3.2)
  • new field type SELECT
  • reflexivity, fields reflect external changes to values
  • store field strings to progmem
  • automatic use of RAM on system without PROGMEM

2.3

  • action functions now need to return bool (only affects menus)

false = continue menu

true = exit menu

  • Support for U8GLib screens
  • alternative use ClickEncoder
  • using flash memory to store menu strings and lists (PROGMEM)

2.0

  • non-blocking menu main cycle
  • Menufields as menu prompts with associated value values can be: numeric withing range list of values toggled on click (for small lists) list of values selected as submenu (for longer lists)
  • PCINT now supports Mega/2560 and possibly others

1.x

  • basic menu functionality

arduinomenu's People

Contributors

christophepersoz avatar d21d3q avatar datacute avatar evfool avatar fa1ke5 avatar ferchinas avatar fmatray avatar grahamwhaley avatar hamidsaffari avatar ivankravets avatar joennuh avatar keldonin avatar knockoutperformance avatar koendv avatar luckyluzz avatar msh2050 avatar nagarjunredla avatar nathandarnell avatar neu-rah avatar per1234 avatar reaper7 avatar roboter avatar scls19fr avatar smplman avatar sphh avatar tamojitsaha avatar thijstriemstra avatar vladkozlov69 avatar welshcoder avatar yevgenb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduinomenu's Issues

Thanks and two questions

Hi. really cool menu :)
took me a while but managed to figure it out. I think it would be easier for people if you could make your examples a bit more complex.
By this I mean:

  1. add some submenu (1 level or even 2 levels down) just so people can figure out easily how to construct complex menu.
  2. the toggle part was nice, but it would be great if you would add also some function calling, not only variable changing. for a beginner like me it would be easier to figure out everything. I am not a programmer, but an el. engineer. I like to tinker. i know how to program at a decent level (nothing fancy) but my lack of experience, makes it very hard for me to implement stuff, and it's easier just to construct by copy-pasting.

Now my questions:

  1. Could you maybe make the menu to have also a background/screensaver (i have no idea what to call it). Similar to what you will find on a 3d printer.
    a screen where you can see stats (whatever people want) and you first have to press select/enter to go into the actual menu. and when the menu times out, or you press exit, to go back to that stats screen.
    would this be possible?

  2. would it be possible to add a time out function. if you don't touch anything for 30 sec/1 min the menu goes back to the main page?

Once again thank you very much.

Changing CHOOSE or TOGGLE behavior on graphic display

Me again :D

Can you tell me where is the CHOOSE or TOGGLE behavior and methods in the lib ? I would like to change the way how the values are displayed - On graphic display you often have enough room to do that.So, I though to something like that :

Menu Choose/Toggle selected > Click (will stay on the menu screen) to edit value > Up/Down will change the value with datas from the VALUE fields > Click to validate changes.

I don't know which one is the easiest to change, maybe TOGGLE.
What do you think ?

enter menu

is it possible to have a homescreen on the lcd. and with press on encoder button, entering the menu?

Arduino Menu for ATmega644P

HI

i have tried with atmega2560. It is working fine.

But when i am trying with ATmega644A encoder is not working. It complains that "uC PCINT REVERSE MAP IS NOT DEFINED".

i have checked the pcint.h file and there are only two micros 328p and mega2560.
How do i add ATmega644P micro?

Please help.

Serial (TX only) with Encoder

Hello,

Is there a way to use serLCD.h instead of the library you had implemented ? I'm using that library to communicate with a 1 wire serial LCD which are not supported yet by the LCD Libraries included.

Thank you

ArduinoMenu v2.4 does not build on Teensy 3.1/3.2 due to PROGMEM

It is just a move of my feedback concerning the build of v2.4 on Teensy board.
Before posting it I tried to #include <avr/pgmspace.h> In menuFields.h but as you noticed this does not solve it. I saw some lib using the same functions that you are using for PROGMEM which seems working. I'm just wondering if it's not a problem related to Template/Macro

Here the build error I'm getting on Teensy board:

Arduino: 1.6.7 (Mac OS X), TD: 1.29, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz optimized (overclock), US English"

/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware "/Applications/Arduino.app/Contents/Java/hardware" -tools "/Applications/Arduino.app/Contents/Java/tools-builder" -tools "/Applications/Arduino.app/Contents/Java/hardware/tools/avr" -built-in-libraries "/Applications/Arduino.app/Contents/Java/libraries" -libraries "/Users/christophepersoz/Developer/_Arduino/libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=96opt,keys=en-us -ide-version=10607 -build-path "/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp" -warnings=none -verbose "/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino"
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware "/Applications/Arduino.app/Contents/Java/hardware" -tools "/Applications/Arduino.app/Contents/Java/tools-builder" -tools "/Applications/Arduino.app/Contents/Java/hardware/tools/avr" -built-in-libraries "/Applications/Arduino.app/Contents/Java/libraries" -libraries "/Users/christophepersoz/Developer/_Arduino/libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=96opt,keys=en-us -ide-version=10607 -build-path "/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp" -warnings=none -verbose "/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino"
Build options changed, rebuilding all

...

"/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino5/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
"/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10607 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3" "-I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI" "-I/Users/christophepersoz/Developer/_Arduino/libraries/U8g_teensy" "-I/Users/christophepersoz/Developer/_Arduino/libraries/U8glib" "-I/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src" "/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp/sketch/U8Glib_ClickEncoder_Teensy_Demo.ino.ino.cpp" -o "/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp/sketch/U8Glib_ClickEncoder_Teensy_Demo.ino.ino.cpp.o"
In file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:29:0:
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:102:8: warning: extra tokens at end of #endif directive [enabled by default]
 #endif RSITE_ARDUINOP_MENU_LCD
        ^
In file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:27:0:
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h: In constructor 'menuOut::menuOut(int, int, int, int)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:48:9: warning: 'menuOut::maxY' will be initialized after [-Wreorder]
     int maxY;
         ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:45:9: warning:   'int menuOut::top' [-Wreorder]
     int top;//top for this device
         ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:56:12: warning:   when initialized here [-Wreorder]
     inline menuOut(int x=0x7F,int y=0x7F,int resX=1,int resY=1)
            ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:51:9: warning: 'menuOut::resY' will be initialized after [-Wreorder]
     int resY;
         ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:44:11: warning:   'menu* menuOut::drawn' [-Wreorder]
     menu* drawn;//last drawn menu, avoiding clear/redraw
           ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:56:12: warning:   when initialized here [-Wreorder]
     inline menuOut(int x=0x7F,int y=0x7F,int resX=1,int resY=1)
            ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h: In constructor 'prompt::prompt(const char*)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:123:10: warning: 'prompt::enabled' will be initialized after [-Wreorder]
     bool enabled;
          ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:121:18: warning:   'promptAction prompt::action' [-Wreorder]
     promptAction action;
                  ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:124:12: warning:   when initialized here [-Wreorder]
     inline prompt(const char * text):text(text),enabled(true),action(nothing) {}
            ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h: In constructor 'menuNode::menuNode(const char*)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:141:12: warning: 'menuNode::oy' will be initialized after [-Wreorder]
     int ox,oy;//coordinate origin displacement
            ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:140:9: warning:   'int menuNode::width' [-Wreorder]
     int width;//field or menu width
         ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:145:12: warning:   when initialized here [-Wreorder]
     inline menuNode(const char * text):prompt(text),ox(0),oy(0),width(32),previousMenu(NULL) {}
            ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h: In constructor 'menuNode::menuNode(const char*, promptAction)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:141:12: warning: 'menuNode::oy' will be initialized after [-Wreorder]
     int ox,oy;//coordinate origin displacement
            ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:140:9: warning:   'int menuNode::width' [-Wreorder]
     int width;//field or menu width
         ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:146:12: warning:   when initialized here [-Wreorder]
     inline menuNode(const char * text,promptAction action):prompt(text,action),ox(0),oy(0),width(32) {}
            ^
In file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:28:0:
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'virtual bool menuVariant<T>::needRedraw(menuOut&, bool)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:139:56: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]
    bool nr=((menuValue<T>*)pgm_read_ptr_near(&data[sel]))->value!=target;//||p.lastSel!=sel;
                                                        ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:139:56: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'void menuVariant<T>::sync()':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:147:52: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]
      if (((menuValue<T>*)pgm_read_ptr_near(&data[n]))->value==target)
                                                    ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'virtual void menuVariant<T>::printTo(menuOut&)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:153:42: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]
    ((prompt*)pgm_read_ptr_near(&data[sel]))->printTo(p);
                                          ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'virtual bool menuSelect<T>::needRedraw(menuOut&, bool)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:182:67: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]
    return ((menuValue<T>*)pgm_read_ptr_near(&menu::data[menu::sel]))->value!=menuVariant<T>::target;
                                                                   ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'virtual void menuSelect<T>::printTo(menuOut&)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:188:54: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]
    ((prompt*)pgm_read_ptr_near(&menu::data[menu::sel]))->printTo(p);
                                                      ^
In file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:29:0:
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h: In constructor 'menuU8G::menuU8G(U8GLIB&, unsigned char, unsigned char, unsigned char, unsigned char, uint8_t, uint8_t)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:31:13: warning: 'menuU8G::gfx' will be initialized after [-Wreorder]
     U8GLIB& gfx;
             ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:25:18: warning:   'unsigned char menuU8G::bgColor' [-Wreorder]
    unsigned char bgColor;
                  ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:32:5: warning:   when initialized here [-Wreorder]
     menuU8G(
     ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:27:18: warning: 'menuU8G::disabledColor' will be initialized after [-Wreorder]
    unsigned char disabledColor;
                  ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:24:18: warning:   'unsigned char menuU8G::hiliteColor' [-Wreorder]
    unsigned char hiliteColor;
                  ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:32:5: warning:   when initialized here [-Wreorder]
     menuU8G(
     ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:29:17: warning: 'menuU8G::disabledColorHi' will be initialized after [-Wreorder]
   unsigned char disabledColorHi;
                 ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:48:63: warning:   base 'menuOut' [-Wreorder]
     menuOut(gfx.getWidth()/resX,gfx.getHeight()/resY,resX,resY)
                                                               ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:32:5: warning:   when initialized here [-Wreorder]
     menuU8G(
     ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h: In member function 'virtual void menuU8G::printMenu(menu&, bool)':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:92:56: error: 'pgm_read_ptr_near' was not declared in this scope
      printPrompt(*(prompt*)pgm_read_ptr_near(&m.data[i]),i == m.sel,i+1,m.ox,(i-top)+m.oy,m.width);
                                                        ^
In file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:28:0:
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'menuField<T>::menuField(T&, const char*, const char*, T, T, T, T, bool (*)()) [with T = int]':
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:69:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:57:26: warning: 'menuField<int>::func' will be initialized after [-Wreorder]
   promptFeedback (*func)();
                          ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:56:8: warning:   'bool menuField<int>::tunning' [-Wreorder]
   bool tunning;
        ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:60:3: warning:   when initialized here [-Wreorder]
   menuField(T &value,const char * text,const char *units,T low,T high,T step,T tune=0,promptFeedback (*func)()=nothing)
   ^
In file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:28:0:
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'void menuVariant<T>::sync() [with T = bool]':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:261:64:   required from 'menuToggle<T>::menuToggle(const char*, unsigned int, menuValue<T>* const*, T&) [with T = bool]'
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:59:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:147:52: error: 'pgm_read_ptr_near' was not declared in this scope
      if (((menuValue<T>*)pgm_read_ptr_near(&data[n]))->value==target)
                                                    ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'void menuVariant<T>::sync() [with T = int]':
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:226:64:   required from 'menuChoice<T>::menuChoice(const char*, unsigned int, menuValue<T>* const*, T&) [with T = int]'
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:81:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:147:52: error: 'pgm_read_ptr_near' was not declared in this scope
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'void menuVariant<T>::printTo(menuOut&) [with T = int]':
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:153:42: error: 'pgm_read_ptr_near' was not declared in this scope
    ((prompt*)pgm_read_ptr_near(&data[sel]))->printTo(p);
                                          ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'bool menuVariant<T>::needRedraw(menuOut&, bool) [with T = int]':
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:139:56: error: 'pgm_read_ptr_near' was not declared in this scope
    bool nr=((menuValue<T>*)pgm_read_ptr_near(&data[sel]))->value!=target;//||p.lastSel!=sel;
                                                        ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'bool menuChoice<T>::activate(menuOut&, Stream&, bool) [with T = int]':
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:244:76: error: 'pgm_read_ptr_near' was not declared in this scope
     menuValue<T>* cp=(menuValue<T>*)pgm_read_ptr_near(&this->menu::data[op]);
                                                                            ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'void menuVariant<T>::printTo(menuOut&) [with T = bool]':
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:153:42: error: 'pgm_read_ptr_near' was not declared in this scope
    ((prompt*)pgm_read_ptr_near(&data[sel]))->printTo(p);
                                          ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'bool menuVariant<T>::needRedraw(menuOut&, bool) [with T = bool]':
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:139:56: error: 'pgm_read_ptr_near' was not declared in this scope
    bool nr=((menuValue<T>*)pgm_read_ptr_near(&data[sel]))->value!=target;//||p.lastSel!=sel;
                                                        ^
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'bool menuToggle<T>::activate(menuOut&, Stream&, bool) [with T = bool]':
/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here
/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:268:82: error: 'pgm_read_ptr_near' was not declared in this scope
    menuValue<T>* cp=(menuValue<T>*)pgm_read_ptr_near(&this->menu::data[menu::sel]);
                                                                                  ^
Using library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI 
Using library U8g_teensy in folder: /Users/christophepersoz/Developer/_Arduino/libraries/U8g_teensy (legacy)
Using library U8glib in folder: /Users/christophepersoz/Developer/_Arduino/libraries/U8glib (legacy)
Using library Menu at version 2.4 in folder: /Users/christophepersoz/Developer/_Arduino/libraries/Menu 
Error compiling for "Teensy 3.2 / 3.1"

And for both, the Sketch U8Glib_ClickEncoder_Teensy_Demo.ino.ino is the one include in the v2.4 named U8Glib_menu.ino with the following changes at the beginning to have the same Sketch for 2 different boards.

#include <avr/pgmspace.h>
#if defined(__AVR_ATmega2560__)
  #include <U8glib.h>
#elif defined (__MK20DX256__) || defined(__MK20DX128__) // Teensy 3.2, 3.1 and 3.0
  #include <SPI.h>          // SPI transaction library
  #include <U8g_teensy.h>   // OLED display driver u8g_teensy
#else
  #error "DEFINE YOUR BOARD TYPE HERE"
#endif


#include <menu.h>//menu macros and objects
#include <menuFields.h>
#include <menuU8G.h>

#define U8_DC 9
#define U8_CS 10
#define U8_RST 7


#if defined(__AVR_ATmega2560__)
  U8GLIB_NHD31OLED_GR u8g(U8_CS, U8_DC, U8_RST); 
  //U8GLIB_PCD8544 u8g(U8_CS, U8_DC, U8_RST) ;
#elif defined (__MK20DX256__) || defined(__MK20DX128__) // Teensy 3.2, 3.1 and 3.0
  U8GLIB u8g(&u8g_dev_ssd1322_nhd31oled_2x_gr_hw_spi, u8g_com_hw_spi_fn); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
#else
  #error "U8GLIB DISPLAY NEEDED"
#endif


menuU8G gfx(u8g,1,0,1,1,7,9);

As you see, there much is much more issues on Teensy. Maybe they are all linked. The main concern is pgm_read_ptr_near() which is not recognized.

It's a good idea to introduce the use of #define USEPGM. Teensy have a lot of SRAM and that will allows us to test the v2.4 ;)
Thanks a lot

Examples won't compile out of the box

Just trying the samples included in the download.

The error I got after compile in Arduino IDE version 1.6.3: "streamFlow.h: No such file or directory"
Missing file?

Issue on build still with GCC under XCode

Hi Rui,

Hope you are good.

I'm still having a problem when I'm trying to build a Menu under Xcode IDE + embedXcode+. It seems that the GCC option are more restrictive or something like that and create error on build.

Here the one I'm getting on a really simple menu with 2 SELECT entry.

First error on macros.h
/Developer/_Arduino/libraries/Menu/src/macros.h:186:68: error: conversion from 'void()' to 'promptAction' is ambiguous

Second error on menuField.h
/Developer/_Arduino/libraries/Menu/src/menuFields.h:41:12: error: initializing argument 3 of 'menuValue<T>::menuValue(const char*, T, promptAction) [with T = unsigned char]'

uint8_t _prjId = 0;

void loadProject() {}
void saveProject() {}

SELECT( _prjId, loadPrj, "LOAD BANK ",
       VALUE( "1", 1, loadProject ),
       VALUE( "2", 2, loadProject ),
       VALUE( "3", 3, loadProject ),
       VALUE( "4", 4, loadProject ),
       VALUE( "5", 5, loadProject ),
       VALUE( "6", 6, loadProject ),
       VALUE( "7", 7, loadProject ),
       VALUE( "8", 8, loadProject ),
       VALUE( "9", 9, loadProject ),
       VALUE( "10", 10, loadProject ),
       VALUE( "11", 11, loadProject ),
       VALUE( "12", 12, loadProject )
       );

SELECT( _prjId, savePrj, "SAVE IN BANK ",
       VALUE( "1", 1, saveProject ),
       VALUE( "2", 2, saveProject ),
       VALUE( "3", 3, saveProject ),
       VALUE( "4", 4, saveProject ),
       VALUE( "5", 5, saveProject ),
       VALUE( "6", 6, saveProject ),
       VALUE( "7", 7, saveProject ),
       VALUE( "8", 8, saveProject ),
       VALUE( "9", 9, saveProject ),
       VALUE( "10", 10, saveProject ),
       VALUE( "11", 11, saveProject ),
       VALUE( "12", 12, saveProject )
       );

MENU( mPageA,"PROJECTS",
     SUBMENU( loadPrj ),
     SUBMENU( savePrj )
     );

Is there a way to fix it by adding some option on GCC or changing the code to solve the errors on build ? I would like to stay under Xcode IDE which provide much much more than the bad Arduino IDE to code under OS X ;)

Is the only way to avoid error is code the menu without Macro as you suggest in the Wiki ?
If yes, what is the correct syntax for TOGGLE, SELECT, FIELD and VALUE ?

Let me know if you need more informations.

Thanks !

Serial Menu + Encoder. It is possible??

This library is just amazing!

Is there a possibility to use Serial Menu with Encoder?? I am using this Serial LCD but I need the encoder for the menu.

How may I achieve this?

chainStream.h peek and read returns -1 on Teensy

Hi Rui,

I discover that chainstream.h and particularly peek() and read() returns -1 every twice move or click when used with ClickEncoder. The clickencoderstream seems working well, but when I'm tracing on Serial the values returned by chainstream there is this -1 that creates missed clicks or move of the encoder. At this time the workaround I found is to replace the -1 by 1 ( not really academic I admit). I don't know if this is linked to ARM platform. I don't have a Arduino to test it.

Thanks

ISO C++ forbids initialization of member...

Arduino: 1.0.6 (Mac OS X), Board: "Arduino Nano w/ ATmega328"
ISO C++ forbids initialization of member...

we have to move member initialization to the class constructors

Use of a different Encoder library

Hello,

Do you think ids that possible to use an another Encoder library (https://github.com/0xPIT/encoder) with ArduinoMenu ? The library mentioned have some behaviors that are interesting for my project, but I'm not sure I can map it to your Menu Library and take advantage of Acceleration, Button Click, Held, Double Click, etc.
Also, I plan to run the Menu on a Teensy board and not an Arduino one, and I'm not sure that Teensy 3.2 require a PCInt remapping (and I also don't know how to do it !). Because of that I would like to Stream from ClickEncoder library instead of QuadEncoder.

If you can have a look, that could be great !
Thanks a lot.

Text fields, providing methods for text entry

Hi Rui,

I'm keep going on my dev and since I stop the test and move back to my dev environment (Xcode 7.3.1 + embedXcode+ ) I'm getting some errors on build. I think the compiler is more restrictive than the one on Arduino IDE (I'm still looking for a way to change that).

Here are the errors that pops up on build (I got them several times, but it's always the same in a way).

1.Error on promptAction, Menu/src/macros.h:186:68: error: conversion from 'void()' to 'promptAction' is ambiguous

  1. Menu/src/macros.h:179:41: error: 'menuTextField' does not name a type
    (it seems that the Macro for TEXTFIED isn't working)
  2. Menu/src/macros.h:178:94: error: invalid conversion from 'void (*)()' to 'bool (*)()' [-fpermissive]
    It seems that activate the -fpermissive option on the compiler can turn this error into warning (looking for that)
  3. Menu/src/menuFields.h:59:3: error: initializing argument 8 of 'menuField<T>::menuField(T&, const char*, const char*, T, T, T, T, bool (*)()) [with T = unsigned char]' [-fpermissive]
  4. Menu/src/menuFields.h:41:12: error: initializing argument 3 of 'menuValue<T>::menuValue(const char*, T, promptAction) [with T = unsigned char]'
  5. Menu/src/macros.h:190:34: error: '_menuTextField24' was not declared in this scope
    (I'm trying to use the TEXTFIELD() to have a project name edited, not sure that it works)
  6. Menu/src/macros.h:190:34: error: '_menuTextField26' was not declared in this scope
  7. Menu/src/menu.h:124:12: error: initializing argument 2 of 'prompt::prompt(const char*, promptAction)'

Any idea or clue to solve that - maybe be that there is some dev trick to avoid them ? On the other hand I ask some help to embedXcode developper to find out a solution for -fpermissive on build which can solve a lot.

Thanks and have a great day !

Problem with activeMenu

Hi, I would like to display (overlay) a time function in only selected submenus with the following code:
menuNode::activeMenu;// is the current menu
menuNode::activeMenu->sel;// is the index of selected option (hilited), zero based

But it seems there is no activeMenu (compiler says: error: 'activeMenu' is not a member of 'menuNode').

I am trying to overlay a submenu with this example in my function:
if (menuNode::activeMenu==myMenuName) {
thenOverlayMyTimeCodeInTopRight :)
}

encoder issue

I have an encoder / sketch working on an Arduino Nano but can't get it to work on an Arduino Mega. Are there any known issues with that hardware or maybe I'm just overlooking something obvious. I am using pins 2[clk],3[dt],4[sw] for both pieces of hardware.

Menu with ATmega 1284p

I'm trying to load a sketch with your menu system. However I got the following error: #error "uC PCINT REVERSE MAP IS NOT DEFINED"
I found in a previous issue that someone hat the same problem. I entered in the PCINT.h file the following line:

elif ( defined(AVR_ATmega1284) )

    const uint8_t PROGMEM pcintPinMap[4][8]={{A0,A1,A2,A3,A4,A5,A6,A7},{0,1,2,3,4,5,6,7},{16,17,18,19,20,21,22,23},{8,9,10,11,12,13,14,15}};

as you sugested in the previous issue.
I found the pin numbers on the follow site: https://github.com/NicoHood/PinChangeInterrupt.
Ben

Reduction of memory usage?

Hey,
I got my Menu quiet finished and now it takes up to 30% of program storage space and about 50% of dynamic memory on an UNO. Is it possible to reduce the footprint?

//*-------------------------------------------------------------------------------------------------------------------------------------
// MENU DEFINITION
//*-------------------------------------------------------------------------------------------------------------------------------------

  TOGGLE(Firti_ManualON,Ferti_TOG,"PumpMan     ",
  VALUE("On",HIGH),
  VALUE("Off",LOW)
);
MENU(subMenuTimer, "Fertilization",
     SUBMENU(Ferti_TOG),
     FIELD(FertiPumpSpeed ,       "PumpSpeed  ", "%", 0, 60, 1, 0),
     FIELD(Ferti_StartTime,       "StartTime  ", "h", 0, 24, 1, 0),
     FIELD(Ferti_DurationTime ,   "Duration   ", "s", 0, 60, 1, 0)
    );

MENU(subDateTime, "Date/Time",
     FIELD(hour1 ,   "Hour    ", " ", 0, 24, 1, 0),
     FIELD(minute1 , "Minute  ", " ", 0, 60, 1, 0),
     OP("SaveClockMemory", setTimeRTC)
    );

MENU(subMenuTemperature,  "Temp/Light/PID",
     FIELD(TempSetpoint,   "SetPoint", "C", 15, 30, 1, 0),
     FIELD(TempAlarm,      "Alarm   ", "C", 15, 30, 1, 0),
     FIELD(PID_AutoManOff, "PID Mode   ", "", 0, 3, 1, 0),
     FIELD(Xd,             "PID Xd     ", "", 0, 10, 1, 0),
     FIELD(Xi,             "PID Xi     ", "", 0, 10, 1, 0),
     FIELD(Xs,             "PID Xs     ", "", 0, 10, 1, 0),
     FIELD(PID_MAN,        "PID MAN-Y  ", "%", 0, 100, 1, 0),
     FIELD(LightMaxY,      "PID MaX-Y  ", "%", 50, 100, 1, 0),
     FIELD(LightMinY,      "PID MiN-Y  ", "%", 0, 50, 0, 0),
     FIELD(LightOn ,       "Light On   ", "h", 0, 24, 1, 0),
     FIELD(LightOff ,      "Light Off  ", "h", 0, 24, 1, 0)
    );

MENU(mainMenu, "Aquarium",
     SUBMENU(subMenuTemperature),
     SUBMENU(subMenuTimer),
     SUBMENU(subDateTime),
     OP("Exit", pauseMenu)
    );


Progmem

Move menu structures into progmem...

U8Glib and interactivity question

Hello,

I plan to use your fantastic menu library for an another project and I wonder if it is adaptable to use U8Glib graphic library instead of Adafruit library ?
Also, do you think that the menu behavior can act as an all interactive options available — I mean changing directly the values without changing the content of the display.

Thanks a lot !
Christophe

Compile problem with FIELD

Hello Rui, wrote an email yesterday but found the forum now, sorry for that:

I found your Arduino-Menue Lib in youtube. Its really a cool thing which saves a lot of time in coding embedded application. I would like to use it in my Balancing Robot project. It took me no affords to get the example code with the i2c lcd running in my arduino 1.0.6 ide on windows. But if i add a FIELD menue entry the compiler throws out an error:

I2C_menu:34: error: variable 'menuField<const char [5]> _menuField0' has initializer but incomplete type

the modified Code is here

/********************
Arduino generic menu system
Arduino menu on I2C LCD example
http://www.r-site.net/?at=//op%5B%40id=%273090%27%5D

Sep.2014 Rui Azevedo - ruihfazevedo(@rrob@)gmail.com
creative commons license 3.0: Attribution-ShareAlike CC BY-SA
This software is furnished "as is", without technical support, and with no
warranty, express or implied, as to its usefulness for any purpose.

Thread Safe: No
Extensible: Yes

LCD library:
https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
http://playground.arduino.cc/Code/LCD3wires
*/

include <Wire.h>

include <LiquidCrystal_I2C.h>

include <menu.h>//menu macros and objects

include <menuLCDs.h>//F. Malpartida LCD's

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
menuLCD menu_lcd(lcd,16,2);//menu output device

int para=0;
void nothing() {}

MENU(mainMenu,"Main",
FIELD(para,"Para","Unit",0,1000,10,1,nothing),
OP("Frequency",nothing),
OP("Dutty",nothing),
OP("Setup",nothing)
);

void setup()
{
Serial.begin(9600);
Wire.begin();
lcd.begin(16,2);
lcd.print("Ok");
}

void loop()
{
//serial can use numbers or +/- and Enter=* Esc=/ to navigate (nav keys can be redefined)
mainMenu.poll(menu_lcd,Serial);
}

Maybe you can be so kind and point me to the right way cause my knowledge in #-directive is very weak (yes i am a spoiled java-guy in real life;-))

greetings from austria and thanks

robert

PCINT on atmega328

PCInt status is not being correctly signaled on PCINT status map for atmega328
cause interrupt vector to be called only once, therefor encoder is not working on atmega328
atmega2560 seems to work fine

Add a function on SUBMENU call

Hello,

You menu is great to create complex structure and easy debugging/navigation/use, thanks a lot to share it.
Now that I'm much more comfortable with your library, I would like to expand it and add a function on SUBMENU call. Is that possible ? I tried but it seems that is only possible for OP, FIELD and VALUE.
Any track to follow ?
This will allows to launch several actions entering a sub-menu instead of doing it inside the loop by testing the level of the current menu.

Thanks in advance

bug on graphics on long menus

Hi, i just used your great lib to do some menu actions.

However i noticed a -maybe- bug in your lib.

i have some long menus, with different options. And as you see on the screenshot there is a displaying bug at "input 6". The appeareance of this bug differs if i change the text in this line, but it is laways present.

Any ideas ?

screenshot: https://pl.vc/pt8go

code (to reproduce the bug, not the whole project, only the menu code):

`/***************************************
Arduino generic menu system
GFX menu - unsing adafruit gfx screens
tested on ATmega2560
http://www.r-site.net/?at=//op%5B%40id=%273090%27%5D

Sept. 2014 Rui Azevedo - ruihfazevedo(@rrob@)gmail.com

creative commons license 3.0: Attribution-ShareAlike CC BY-SA
This software is furnished "as is", without technical support, and with no
warranty, express or implied, as to its usefulness for any purpose.

Thread Safe: No
Extensible: Yes

Adafruit GFX library from:
https://learn.adafruit.com/adafruit-gfx-graphics-library/overview
Display ST7735 driver
http://www.adafruit.com/product/358
_/
/
_***************
Rui Azevedo 2014
ruihfazevedo@[email protected]
********/

include <SPI.h>

include <menu.h>//menu macros and objects

include "menuFields.h"

//#include <pcint.h>//this is incompatible with software serial (arduino needs an handler!)

include <quadEncoder.h>//quadrature encoder driver and fake stream

include <keyStream.h>//keyboard driver and fake stream (for the encoder button)

include <chainStream.h>// concatenate multiple input streams (this allows adding a button to the encoder)

//#include <menuPrint.h>//Print (Serial) menu

include <Adafruit_GFX.h> // Core graphics library

include <Adafruit_ST7735.h> // Hardware-specific library

include <menuGFX.h>

if defined(AVR_ATmega2560)

///////////////////////////////////////////////////////////////////////////
//TFT + SD
//#define sdCS 9//not using SD card
#define tftCS 10
#define dc 8
#define rst -1
////////////////////////////////////////////
// ENCODER (aka rotary switch) PINS
#define encA 10
#define encB 12
#define encBtn 13

elif defined(AVR_ATmega328) || defined(AVR_ATmega328P)

///////////////////////////////////////////////////////////////////////////
//TFT + SD
//#define sdCS 9//not using SD card
#define tftCS 10
#define dc 8
#define rst -1
////////////////////////////////////////////
// ENCODER (aka rotary switch) PINS
#define encA 2
#define encB 3
#define encBtn 4

else

#error "Uknown pinout"

endif

Adafruit_ST7735 tft(tftCS, dc, rst);
///////////////////////////////////////////////////////////////////////////
//functions to wire as menu actions

//aux function
void nothing() {}

void setValue(int &value,prompt &p,menuOut &o, Stream &i,const char* text,const char* units="",int sensivity=5,int low=0,int hi=100,int steps=0,void (*func)()=nothing);

volatile unsigned int inputModes[] = {1, 1, 1, 1, 1, 1, 1, 1, 1}; // 0 = off 1 = CYL 2 = EGT
volatile unsigned int temperatureIndicatorEGT[] = {150, 170, 200};
volatile unsigned int temperatureIndicatorCYL[] = {150, 170, 200};

/////////////////////////////////////////////////////////////////////////
// MENU DEFINITION
// here we define the menu structure and wire actions functions to it

TOGGLE(inputModes[0],input1,"Input 1 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);
TOGGLE(inputModes[1],input2,"Input 2 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);
TOGGLE(inputModes[2],input3,"Input 3 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);
TOGGLE(inputModes[3],input4,"Input 4 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);
TOGGLE(inputModes[4],input5,"Input 5 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);
TOGGLE(inputModes[5],input6,"Input 6 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);
TOGGLE(inputModes[6],input7,"Input 7 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);
TOGGLE(inputModes[7],input8,"Input 8 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);
TOGGLE(inputModes[8],input9,"Input 9 :",
VALUE("OFF",0),
VALUE("EGT",1),
VALUE("CYL",2)
);

MENU(EGT,"EGT",
FIELD(temperatureIndicatorEGT[0],"EGT LOW"," C",0,400,10,1,nothing),
FIELD(temperatureIndicatorEGT[1],"EGT HIGH"," C",0,400,10,1,nothing),
FIELD(temperatureIndicatorEGT[2],"EGT CRITICAL"," C",0,400,10,1,nothing)
);

MENU(CYL,"CYL",
FIELD(temperatureIndicatorCYL[0],"CYL LOW"," C",0,400,10,1,nothing),
FIELD(temperatureIndicatorCYL[1],"CYL HIGH"," C",0,400,10,1,nothing),
FIELD(temperatureIndicatorCYL[2],"CYL CRITICAL"," C",0,400,10,1,nothing)
);

MENU(Temperatures,"Temperatures",
SUBMENU(EGT),
SUBMENU(CYL)
);

MENU(inputMode,"Input Modes",
SUBMENU(input1),
SUBMENU(input2),
SUBMENU(input3),
SUBMENU(input4),
SUBMENU(input5),
SUBMENU(input6),
SUBMENU(input7),
SUBMENU(input8),
SUBMENU(input9)
);

MENU(Log,"Log",
OP("Op1",nothing),
OP("Op2",nothing),
OP("Op3",nothing)
);

MENU(Time,"Time",
OP("Op1",nothing),
OP("Op2",nothing),
OP("Op3",nothing)
);

MENU(LCD,"LCD",
OP("Op1",nothing),
OP("Op2",nothing),
OP("Op3",nothing)
);

MENU(mainMenu,"Sistema",
SUBMENU(Temperatures),
SUBMENU(inputMode),
SUBMENU(Log),
SUBMENU(Time),
SUBMENU(LCD)
);

//the quadEncoder
quadEncoder encoder(encA,encB);//simple quad encoder driver
quadEncoderStream enc(encoder,5);// simple quad encoder fake Stream

//a keyboard with only one key :D, this is the encoder button
keyMap encBtn_map[]={{-encBtn,menu::enterCode}};//negative pin numbers means we have a pull-up, this is on when low
keyLook<1> encButton(encBtn_map);

//multiple inputs allow conjugation of the quadEncoder with a single key keyboard that is the quadEncoder button
Stream* in[]={&enc,&encButton};
chainStream<2> quadEncoder_button(in);

//alternative to previous but now we can input from Serial too...
Stream* in3[]={&enc,&encButton};
chainStream<3> allIn(in3);

//describing a menu output, alternatives so far are Serial or LiquidCrystal LCD
menuGFX gfx(tft);

/////////////////////////////////////////////////////////////////////////
void setup() {
SPI.begin();
tft.initR(INITR_BLACKTAB);
tft.setRotation(4);
tft.setTextWrap(false);
tft.setTextColor(ST7735_RED,ST7735_BLACK);
tft.setTextSize(1);
gfx.resX_=1;//update resolution after font size change
gfx.resY_=1;//update resolution after font size change
tft.fillScreen(ST7735_BLACK);
tft.print("Menu test on GFX");
//testing menu limits (not using all the screen)
//size is within screen limits even after rotation
//this limits are not constrained, please ensure your text fits
gfx.maxX=24;
gfx.maxY=16;
gfx.bgColor=BLACK;

pinMode(encBtn, INPUT);
digitalWrite(encBtn,1);

encoder.begin();

delay(300);
tft.fillScreen(BLACK);
}

///////////////////////////////////////////////////////////////////////////////
// testing the menu system
void loop() {
mainMenu.poll(gfx,allIn);
}
`

I am using an rotary encoder, arduino uno and teh adafruit 1.8 breakout board.

Have a nice day !

non-block encoder button

Encoder button (and possibly other button types) are blocking until the button is released....
make this non-blocking

Text fields

received suggestion from Alex

Thank you for your Arduino menu, I run it on esp8266 device and it works good!
Can you add ability to edit string via menu?

Recommended way to detect top-level exit was pressed?

Hi, I love the library though I struggle to understand using it sometimes !

What do you recommend for detecting that top-level exit is pressed when using the "canExit=true" mechanism? I don't need to detect sub-menu exit.

On a side note, my submenus don't seem to be showing "exit", but rather a duplicate of the last submenu entry

CHOOSE submenu draw & behavior?

The "CHOOSE" submenu has a "hiden" non selelectable menu-item at bottom of menu if the value list contains number of members less than .maxY and has a doubled, also non selectale item if more or equal.
Is it a bug?
And a second question. How I can add an "Exit" option to the "Choose" submenu?
I suspect that these two questions are interdependent :)

Consolidate API

API proposals

utility functions

new memory mode (PROGMEM) makes it horrible to set simple things like prompt enable/disable.

add aux function to ez this
eventually add extra macro parameter

customization

send customization variables to PROGMEM (static const)

allow static customization... what is the best way of doing it?

Strange behavior with ClickEncoderStream.h

Hi Rui,

I'm still going on my project and Teensy debug, and I'm still notice a bug I mentioned you when you were working on PROGMEM issue. I thought it was OK since then, but it is not ;)
Here the problem :

• On Serial and Display, the encoder is restricted to lines 1 and 2 of the menu, even if the menu have more lines.
• The strange behavior is, if the line 2 is a FIELD, I can edit the value (limited to the first 2 values on a SELECT or a TOGGLE), validate it, and then the limitation shift of one line. So after that I can only select lines 2 and 3, and so on. The range is still limited to 2 lines.
• Linked to that, the cycling navigation does not work.

Any ideas of what's going wrong with the navigation ? It was working well on v2.1 if I remind me well.
I will check the values by putting some Serial outputs on QuadEncoder changes to see what's going on. If on your side you have an idea...

Thanks !
Christophe

What's to change when updating 2.0 to 2.4?

Hey,
got a bit time and wanted update to 2.4 cause of PROGMEM feature. Got a lot compile errors. Some known things to change in my project?

Thanks!

Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\Thomas\Documents\Arduino\Projects\Aquarium\ArduinoMenu_I2C_LCD_16x2_RotaryEncoder\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13.ino:14:0:

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h: In member function 'virtual void menuLCD::printMenu(menu&, bool)':

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h:47:85: error: no matching function for call to 'menuLCD::printPrompt(prompt&, bool, int, int, int&)'

       printPrompt(*(prompt*)pgm_read_ptr_near(&m.data[i]),i==m.sel,i+1,i-top,m.width);

                                                                                     ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h:47:85: note: candidate is:

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h:35:16: note: virtual void menuLCD::printPrompt(prompt&, bool, int, int, int, int)

   virtual void printPrompt(prompt &o,bool selected,int idx,int posX,int posY,int width) {

                ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h:35:16: note:   candidate expects 6 arguments, 5 provided

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h:50:61: error: no matching function for call to 'menuLCD::printPrompt(prompt&, bool, int, int, int&)'

     printPrompt(menu::exitOption,m.sel==m.sz,0,i-top,m.width);

                                                             ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h:50:61: note: candidate is:

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h:35:16: note: virtual void menuLCD::printPrompt(prompt&, bool, int, int, int, int)

   virtual void printPrompt(prompt &o,bool selected,int idx,int posX,int posY,int width) {

                ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menuLCDs.h:35:16: note:   candidate expects 6 arguments, 5 provided

In file included from C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:36:0,

                 from C:\Users\Thomas\Documents\Arduino\Projects\Aquarium\ArduinoMenu_I2C_LCD_16x2_RotaryEncoder\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13.ino:13:

C:\Users\Thomas\Documents\Arduino\Projects\Aquarium\ArduinoMenu_I2C_LCD_16x2_RotaryEncoder\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13.ino: At global scope:

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/macros.h:162:41: error: conversion from 'void()' to 'promptAction' is ambiguous

   prompt op##cnt(title_##cnt,__VA_ARGS__);

                                         ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/macros.h:117:17: note: in expansion of macro 'DECL_OP_'

 #define DECL(x) DECL_##x

                 ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/macros.h:12:34: note: in expansion of macro 'DECL'

 #define FOR_EACH_1(what, x, ...) what(x)

                                  ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/macros.h:15:3: note: in expansion of macro 'FOR_EACH_1'

   FOR_EACH_1(what,  __VA_ARGS__)

   ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/macros.h:18:3: note: in expansion of macro 'FOR_EACH_2'

   FOR_EACH_2(what, __VA_ARGS__)

   ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/macros.h:10:35: note: in expansion of macro 'FOR_EACH_3'

 #define CONCATENATE2(arg1, arg2)  arg1##arg2

                                   ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/macros.h:112:32: note: in expansion of macro 'FOR_EACH_'

 #define FOR_EACH(what, x, ...) FOR_EACH_(FOR_EACH_NARG(x, __VA_ARGS__), what, x, __VA_ARGS__)

                                ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/macros.h:121:3: note: in expansion of macro 'FOR_EACH'

   FOR_EACH(DECL,__VA_ARGS__)\

   ^

C:\Users\Thomas\Documents\Arduino\Projects\Aquarium\ArduinoMenu_I2C_LCD_16x2_RotaryEncoder\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13.ino:95:1: note: in expansion of macro 'MENU'

 MENU(subDateTime, "Date/Time",

 ^

C:\Users\Thomas\Documents\Arduino\Projects\Aquarium\ArduinoMenu_I2C_LCD_16x2_RotaryEncoder\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13.ino:76:6: note: candidates are:

 void setTimeRTC()

      ^

In file included from C:\Users\Thomas\Documents\Arduino\Projects\Aquarium\ArduinoMenu_I2C_LCD_16x2_RotaryEncoder\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13\ArduinoMenu_I2C_LCD_RotaryEncoder-2016.09.13.ino:13:0:

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:109:10: note: promptAction::promptAction(promptAction::callback) <near match>

   inline promptAction(callback f):hFn(f) {}

          ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:109:10: note:   no known conversion for argument 1 from 'void()' to 'promptAction::callback {aka bool (*)(prompt&, menuOut&, Stream&)}'

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:108:10: note: promptAction::promptAction(bool (*)(prompt&, menuOut&)) <near match>

   inline promptAction(promptFeedback (*f)(prompt&,menuOut&)):hFn((callback)f) {}

          ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:108:10: note:   no known conversion for argument 1 from 'void()' to 'bool (*)(prompt&, menuOut&)'

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:107:10: note: promptAction::promptAction(bool (*)(prompt&)) <near match>

   inline promptAction(promptFeedback (*f)(prompt&)):hFn((callback)f) {}

          ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:107:10: note:   no known conversion for argument 1 from 'void()' to 'bool (*)(prompt&)'

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:106:12: note: promptAction::promptAction(bool (*)()) <near match>

     inline promptAction(promptFeedback (*f)()):hFn((callback)f) {}

            ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:106:12: note:   no known conversion for argument 1 from 'void()' to 'bool (*)()'

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-2.4\src/menu.h:125:12: error:   initializing argument 2 of 'prompt::prompt(const char*, promptAction)'

     inline prompt(const char * text,promptAction action)

            ^

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

How to exit from main menu?

Hello! Really great library, I tested with arduino nano+serial 1604 display and encoder with button and it works very well!
More than the issue already reported few days ago by lfc7 on menu refresh, which I haven't solved as well, I am wondering if there is any "embedded mechanism" to exit from main menu, and in such a case, how to re-enter.
Currently I have simply included an "Exit" menu option calling an exit function which prevent menu to be called in void loop().
Thanks!

FIELD menu usage

Hi! Thanks for this avesome library! It works very well, but i can not use Numeris Fields.
My code is at: github.com/szepnorbee/Menu_test/tree/master/menu_test_4

When i compile it i get an error:
variable 'menuField _menuField8' has initializer but incomplete type

I do not understand what I was doing wrong. Thank you for your help and sorry for my bad english.

setPosition() is no more working inside a SUBMENU

Hi ;)

I have notice in the latest version that setPosition() is no longer working when you are entering in a SUBMENU. So the position I'm defining just before the pool is only taken in account in the ROOT.

I've tried to change that in menuField.h, with no success. Do you have an idea ?

use PROGMEM

move as mutch as possible to progmem.. this is needed for uno, but we will loose hability to have dynamic things.... can we have both?

Question about hierarchy position feedback

Hi Rui,

I have a mainMenu that contains 5 SUBMENU (direct sibling).
Is that possible after calling mainMenu.poll() to have a feedback of which SUBMENU I clicked on ?
Only the first level interest me.

I tried to add just after the pool an action on the first SUBMENU with the following trigger code

 PageA.action = trig;

But it removes the poll of the SUBMENU PageA, so the SUBMENU does not shows up as it should.

I know that mainMenu.sel returns me the level of the SUBMENU, but I don't know if I did clicked it to enter in or no.

I there a workaround to have this feedback ?
Thank you.

menuLCDs.h error

If compile I2C menu example, I get error in printPrompt function:

/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h: In member function 'virtual void menuLCD::printMenu(menu&, bool)':
/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h:47:77: error: no matching function for call to 'menuLCD::printPrompt(prompt&, bool, int, int, int&)'
       printPrompt(*(prompt*)pgmPtrNear(m.data[i]),i==m.sel,i+1,i-top,m.width);
                                                                             ^
/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h:47:77: note: candidate is:
/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h:35:16: note: virtual void menuLCD::printPrompt(prompt&, bool, int, int, int, int)
   virtual void printPrompt(prompt &o,bool selected,int idx,int posX,int posY,int width) {
                ^
/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h:35:16: note:   candidate expects 6 arguments, 5 provided
/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h:50:61: error: no matching function for call to 'menuLCD::printPrompt(prompt&, bool, int, int, int&)'
     printPrompt(menu::exitOption,m.sel==m.sz,0,i-top,m.width);
                                                             ^
/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h:50:61: note: candidate is:
/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h:35:16: note: virtual void menuLCD::printPrompt(prompt&, bool, int, int, int, int)
   virtual void printPrompt(prompt &o,bool selected,int idx,int posX,int posY,int width) {
                ^
/Users/dontsov/Documents/Arduino/libraries/ArduinoMenu-master/src/menuLCDs.h:35:16: note:   candidate expects 6 arguments, 5 provided

I prepare, you need add 'index' argument when call 'printPrompt':

printPrompt((prompt)pgmPtrNear(m.data[i]),i==m.sel, i, i+1,i-top,m.width);
printPrompt(menu::exitOption,m.sel==m.sz, 0, 0,i-top,m.width);

Dynamic menu labels

Hi @neu-rah, its me again!!

There is a way to make dynamic menu names? So if I change somenthing in a function then will change the name in the menu.

For example:

If I have a menu item with name: Start Time XX:XX

When I setup this time to YY:YY, when I return to the menu its shows Start Time YY:YY.

Thanks,
Nico.

Create MultiDesktop config

Thanks for the library, it's really perfect.
I want to create device with main screen and menu for change settings. I think, it's rather common aim.
As I see "custom menu drawing" in you API, I think, my idea is possible be solved by your library. Isn't it?

MultiDesktop concept diagram

Using ST7920 GLCD

Is I possible to use a GLCD with ST7920 chip with your library?

Ben

v2.3 do not build

Hello !

Can you tell me if the 2.3 can be build out of the box with the U8Glib.ino I sent you ? I'm getting a lot of error linked to promptAction() and prompt() from menu.h

So, I'm going back to 2.2 at this time.

Otherwise, I tried to figure it out what's going on with FIELD() in edit mode (refresh issues), without any success - did you find something relevant on your side?

Thanks

Unable to compile after adding FIELD

Hi and thank for this great lib!
I got a issue, hope you can help me. After adding FIELD to the Main Manu in the I2C Example the Arduino IDE 1.6.9 is not able to comple the code.

MENU(mainMenu,"Main",
OP("Frequency",nothing),
OP("Dutty",nothing),
OP("Setup",nothing)
FIELD(frequency,"Freq","Hz",0,16000000,100,1,nothing()),
);

ERROR:

Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\Thomas\Documents\Arduino\I2C_menu\I2C_menu.ino:20:0:

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:123:28: error: expected constructor, destructor, or type conversion before '(' token

#define FIELD(...) FIELD_(COUNTER,VA_ARGS)

                        ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:95:26: note: in definition of macro 'DECL'

#define DECL(x) DECL_##x

                      ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:46:5: note: in expansion of macro 'FOR_EACH_2'

 FOR_EACH_2(what, __VA_ARGS__)

 ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:49:5: note: in expansion of macro 'FOR_EACH_3'

 FOR_EACH_3(what,  __VA_ARGS__)

 ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:38:37: note: in expansion of macro 'FOR_EACH_4'

#define CONCATENATE2(arg1, arg2) arg1##arg2

                                 ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:93:34: note: in expansion of macro 'FOR_EACH_'

#define FOR_EACH(what, x, ...) FOR_EACH_(FOR_EACH_NARG(x, VA_ARGS), what, x, VA_ARGS)

                              ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:99:5: note: in expansion of macro 'FOR_EACH'

 FOR_EACH(DECL,__VA_ARGS__)\

 ^

C:\Users\Thomas\Documents\Arduino\I2C_menu\I2C_menu.ino:28:1: note: in expansion of macro 'MENU'

MENU(mainMenu,"Main",

^

C:\Users\Thomas\Documents\Arduino\I2C_menu\I2C_menu.ino:32:3: note: in expansion of macro 'FIELD'

FIELD(frequency,"Freq","Hz",0,16000000,100,1,nothing()),

^

I2C_menu:28: error: 'mainMenu_data' was not declared in this scope

MENU(mainMenu,"Main",

  ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:103:26: note: in definition of macro 'MENU'

 menu id (text,sizeof(id##_data)/sizeof(prompt*),id##_data);

                      ^

I2C_menu:28: error: 'mainMenu_data' was not declared in this scope

MENU(mainMenu,"Main",

  ^

C:\Users\Thomas\Documents\Arduino\libraries\ArduinoMenu-master/menu.h:103:53: note: in definition of macro 'MENU'

 menu id (text,sizeof(id##_data)/sizeof(prompt*),id##_data);

exit status 1
'mainMenu_data' was not declared in this scope

I2C_menu.zip

Refreshrate of Menu

Hi,
I have an analoginput as value in a FIELD to show it on Homescreen. But now it's only refreshing the screen when I navigate thru the Menu. Is there a way to refresh it faster?

MENU(mainMenu,"Aquarium", FIELD(TempInput,"Temp "," C",0,0,0,0), FIELD(TempOutputProzent,"Light "," %",0,0,0,0), SUBMENU(subMenuSettings) );
ArduinoMenu_I2C_LCD_RotaryEncoder-2016.07.22.zip

streamFlow.h

Hi,

Missing streamFlow.h

menu.h

include "../utils/streamFlow.h"

how to force menu refresh?

hello
Can't find the way to force refresh (redraw) of menu, got some "fields" which variables are changing and would like them to appear updated in the menu without need of moving in menus.
thanks

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.