I'm looking for help regarding a project.
I'd like to create a simple menu on a 128x64 OLED I2C display, controlled by a rotary encoder with switch, to be abled to change a parameter and write it to EEProm. Optionally, it also has a function to put another variable to true/false mode and after that show a 'manual speed value control', all of these parameters should also be written to EEProm.
What the menu should contain is: Main page (showing current speed and direction (optionally also current dmx address)) --> click brings up two options: "Set DMX Address" & "Mode"
When "Set DMX Address" is clicked, the current DMX address (1-512) should be displayed, and the user can change it by rotating the encoder. Confirm with a click (which brings you back to the main page).
When "Mode" is clicked, the user can select either "Manual" or "DMX". When "Manual" is selected, the user should be able to set some parameter to a value and optionally also the direction.
I've tried to use the example provided here: https://www.youtube.com/watch?v=k8Vvc4KfPOU&t=1s This looks like a really nice menu.
This obviously doesn't work with my I2C display, so i've changed the display setup from:
//U8G2_SH1106_128X64_VCOMH0_1_4W_HW_SPI u8g2(U8G2_R0, 10, 8); //Original code
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display
Unfortunately this one gave some undefined pixels in the bottom of the screen and only showed the main screen (did see some small movement on the 'slider bar' however when rotating the rotary encoder, but it didn't go to a completely other screen/page). Therefore I've also tried it with this setup line:
//U8G2_SSD1306_128X64_ALT0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the "every 2nd line skipped" problem
But this gave even worse results (no display at all).
Another problem is that this code already used a lot of memory, which is not ideal as the DMX part is not in yet.
Can any of you reach some starting code to help me getting running?