@@ -16,6 +16,7 @@ AVR generic menu/interactivity system
1616- Attachable functions to menu enter (experimental).
1717- Customizable (colors and cursors).
1818- Able to work over Serial stream for regular or debug mode.
19+ - modularity, support for different devices in separate include files.
1920
2021[ ![ IMAGE ALT TEXT] ( https://img.youtube.com/vi/wHv5sU-HXVI/2.jpg )] ( https://youtu.be/wHv5sU-HXVI " Arduino menu 2.0 fields video ") [ ![ IMAGE ALT TEXT] ( https://img.youtube.com/vi/W-TRCziF67g/2.jpg )] ( https://youtu.be/W-TRCziF67g " Arduino menu basic features video ")
2122
@@ -42,14 +43,24 @@ https://github.com/olikraus/U8glib_Arduino
4243
4344Serial https://www.arduino.cc/en/Reference/Serial
4445
45- Generic encoder using PCINT - quadEncoder
46+ quadEncoder - Generic encoder using PCINT
47+
48+ Buttons - simple digital keyboard
4649
4750Generic keyboard (no PCINT) - configurable for digital or analog keyboards
4851
49- ClickEncoder
50- https://github.com/0xPIT/encoder
52+ ClickEncoder https://github.com/0xPIT/encoder
53+
54+ ## Saving memory
55+ Some menu data can be stored on avr programming memory (flash) to save ram for your project.
56+
57+ to activate memory saving put
58+ ``` c++
59+ #define USEPGM
60+ ```
61+ on top of your code before any menu includes.
5162
52- more details on wiki and issues discussions
63+ this is conditional because some non-avr devices might not supoprt it.
5364
5465## Menu definition example
5566example of menu definition (c++ macros)
@@ -136,7 +147,7 @@ the value
136147
137148#### Field value
138149``` c++
139- VALUE (text,value)
150+ VALUE (text,value [ ,action ] )
140151```
141152
142153holding possible FIELD values
@@ -145,13 +156,15 @@ holding possible FIELD values
145156
146157**value**: to be passed when selected
147158
159+ **action**: optional function to be called on activation
160+
148161#### Toggle field value
149162```c++
150- TOGGLE(variable,id,name,
151- VALUE(...),
152- ...,
153- VALUE(...)
154- )
163+ TOGGLE(variable,id,name,
164+ VALUE(...),
165+ ...,
166+ VALUE(...)
167+ )
155168```
156169
157170Holding a value and a list of possible values to toggle on click. This is ideal for On/Off Yes/No and other small list of values
@@ -165,10 +178,10 @@ Holding a value and a list of possible values to toggle on click. This is ideal
165178#### Select field value
166179``` c++
167180SELECT (variable,id,name,
168- VALUE(...),
169- ...,
170- VALUE(...)
171- )
181+ VALUE(...),
182+ ...,
183+ VALUE(...)
184+ )
172185```
173186
174187define a value from a list of possibilities
@@ -185,9 +198,9 @@ click to exit edit mode
185198#### Choose field value
186199```c++
187200CHOOSE (variable,id,name,
188- VALUE(...),
189- ...,
190- VALUE(...)
201+ VALUE(...),
202+ ...,
203+ VALUE(...)
191204)
192205```
193206
@@ -225,23 +238,56 @@ define menu structure
225238
226239** name** : menu name to use as submenu title
227240
241+ ## Include files
242+
243+ ** chainStream.h** - join multiple input stream to be used as one
244+
245+ ** ClickEncoderStream.h** - using encoder https://github.com/0xPIT/encoder
246+
247+ ** genericKeyboard.h** - use a custom keyboard by providing a reader function.
248+
249+ ** keyStream.h** - simple digital keyboard driver doing digitalRead of pins. this driver can miss clicks on heavy load.
250+
251+ ** macros.h** - macro definitions to help building complex menu structure (included by menu.h)
252+
253+ ** menuFields.h** - allows the menu system to alter/monitor your variables, this file defines the behavior of FIELD, TOGGLE, SELECT and CHOOSE.
254+
255+ ** menuGFX.h** - use an Adafruit-GFX-Library compatible screen https://learn.adafruit.com/adafruit-gfx-graphics-library
256+
257+ ** menu.h** - basic menu functionality
258+
259+ ** menuLCD.h** - use the standard arduino LiquidCrystal screen https://www.arduino.cc/en/Tutorial/HelloWorld
260+
261+ ** menuLCDs.h** - use alternative LCD`s https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!hardware-configurations-and-initialization
262+
263+ ** menuPrint.h** - output to Serial stream numbering options for quick access
264+
265+ ** menuU8G.h** - use a U8Glib compatible screen https://github.com/olikraus/u8glib/wiki/device
266+
267+ ** menuUTFT.h** - use UTFT compatible screen http://www.rinkydinkelectronics.com/library.php?id=51
268+
269+ ** menuUTouch.h** - touch screen input http://henningkarlsen.com/electronics/library.php?id=56
270+
271+ quadEncoder.h - basic quad-encoder driver using pin change interrupt. Button should be added as a keyboard.
272+
228273## History
229274
230275### 2.4
231276- new field type SELECT
232277- reflexivity, field reflect external changes to values
233- - field string to progmem
234- - PROGMEM usage is condicional , #define USEPGM
278+ - store field strings to progmem
279+ - PROGMEM usage is optional , #define USEPGM
235280
236281### 2.3
237282
238- - actions functions need to return bool now (only affects menus)
283+ - action functions now need to return bool (only affects menus)
239284
240- false = continue menu
241- true = exit menu
285+ > ** false** = continue menu
286+ >
287+ > ** true** = exit menu
242288
243289- Support for U8GLib screens
244- - alternative use of ClickEncoder
290+ - alternative use ClickEncoder
245291- using flash memory to store menu strings and lists (PROGMEM)
246292
247293### 2.0
0 commit comments