ArduinoMenu
ArduinoMenu copied to clipboard
Show graphics on the display
Is it possible to display graphics on the display through Adafruit GFX? I have an OLED display SSD1306. The menu is displayed well, but there was a need to show the battery charge in the upper right corner, since there is a lot of free space. Now the menu is displayed through the SSD1306AsciiWire library.
Hi, Try to use #include <menuIO/adafruitGfxOut.h> and will change initialization
#define gfxWidth 128
#define gfxHeight 64
#define fontX 7
#define fontY 10
MENU_OUTPUTS(out, MAX_DEPTH, ADAGFX_OUT(display, colors, fontX, fontY, {0, 0, gfxWidth / fontX, gfxHeight / fontY}), SERIAL_OUT(Serial));
But I faced with issue incorrect draw menu item
Hi, I have a similar use case. @neu-rah do you have any guidance on drawing?
We want to have menu selections that lead to plotting a sensor value on the menu screen.
The use case might be select temperature sensors from the top menu, and then select a sensor, and then plot the selected sensor values.
I'm not asking for the plotting part, I can do that with the underlying output driver (U8g). I am asking if that approach will work well with the menu system.
Thanks!
@martykube use a read only numeric field tied to a variable where the sensor read is stored, it will automatically update its value whenever the sensor read changes...
To use custom draw.. there is a project that monitors servos that does indeed an inline plot.
AM4 is line based, the plot is restricted to a single line... next version will not.
@neu-rah, I suppose you are referring to this sketch: https://github.com/jarkman/ServoBox/blob/master/ServoBox.ino
, is that correct?