Does anyone know of a very basic menu system tutorial that allows interaction with a few buttons ?
I’m using a rotary encoder with push button and a Digole colour OLED, for which I’ve cobbled together enough code to display the encoder count+direction and when the button is pressed.
Now I would like to start building a very basic menu, but the only info I can really find uses one of these two Arduino libraries Menwiz or MenuBackend both of which seem rather cumbersome… especially considering I would need to port them Spark, which is probably well beyond me !
Thanks for any advice
@mdma, that library looks great but is only applicable to “dumb” graphic displays. The Digole display is “smart” and has an onboard PIC that runs a command set similar to U8gLib. I am looking at m2tklib to see if I can adapt it to the Digole.
@mala, for now, there is no menu library available for the Digole display.
@mdma & @peekay123, thanks guys.
The m2tklib looks pretty interesting, will have to read up some more.
I’ve spent a lot of time trying to get various examples of the MenuBackend library to compile, but between my limited knowledge and the fractured state of the library in various places, it’s not amounted to much so far
@mala, turns out m2tklib is way to entrenched into u8glib to be able to port. I had tried to port u8glib to the Core but found it too convoluted to do so at this time. Given that the Digole is intelligent, I’ll have to find a different library to port or create one from scratch.
@peekay123, Thank you for taking the time to look into it.
The two libraries seem to be created by the same person, so I guess it’s not that surprising that m2tklib should be dependent on u8glib in some way.
I have a lot to learn before I’m likely to be able to port a library or build one from scratch! So in the meantime I will keep pulling apart the Menubackend examples till I get something basic to work… if nothing else it will be a good learning exercise.
I took a look at the library, and it sounds like a great set of functions for building an excellent menu system.
I’m going to try to use your library for creating a custom menu for a product I’m working on using the Photon & Electron.
Have you used this library on the Photon and got it to compile without errors yet?
I’m planning on using the CAP1188 Capacitive touch which allows up to 8 button inputs. I figure I can modify your code to get the touch sensors outputs to work with your library without many issues.
@jaza_tom, were you looking for a TFT graphical display or a 2/4 line text display? Graphics displays take up a lot of flash if and SD is not used. Have you considered an HMI display (eg, Nextion, 4D Systems, etc.)?
Hey, we are hoping to use a graphical display so that we can display icons and other non-char visuals. The display we are currently using is a 132x64 LCD graphical display. The flash memory consumption doesn’t seem too bad…
display buffer is ~ 1kB
font library ~600 bytes
graphic engine library (unsure what size this equates to once compiled)
Assuming graphic engine library is 20 kB in size, that still leaves over 100 kB for the rest of my application code…
One good thing about the Electron is that it has no shortage of flash!
If worse comes to worse, there is an SD card on board that we can use as well.
@jaza_tom, seeing that it is a small monochrome OLED, then ya, you have plenty of space. Again assuming you use Adafruit_mfGFX and add a couple of fonts, and a few bitmaps (not full screen), then the 20KB budget is fine IMO. Also, you could use a cheap external 1MB external SPI flash to store stuff if you need to.
Hello “neurah” I liked your contribution so much and I thank you for the kindness of your generosity. Your ArduinoMenu looks great; however, I am struggling to compile your codes. I need to build an Arduino Menu for a 480x320 TFT LCD driven by a HX8357 chip. I would like it to have an encoder instead of the touch screen. I am using the TFT_HX8357 library for those Banggood TFTs. Have you worked on something close to what I am striving to achieve and, if so, would you please point me in the right direction?
Best regards and, once again, thank you for sharing such an exemplary piece of work!
Troubleshooter