OMENU[0] - OMENU[3]
This command allows you to create a menu for a 128x64 OLED display that can be controlled using GPIO buttons or a Rotary Encoder. The parameters of the OMENU command are stored in the STR/NUM/CMD area so they can be modified in real-time. The values can only be provided in the form below.
OMENU[0](1)=STR[10]=SETUP
OMENU[0](2)=STR[11]=VALUE
OMENU[0](3)=STR[12]=EXIT
Creates a menu item. A maximum of 6 items can fit in a menu, as that is the limit of the display.
OMENU[0](1)CB:CMD[13]=OMENU[1]
OMENU[0](2)CB:CMD[14]=ROT[0]CHG
OMENU[0](3)CB:CMD[15]=OMENU<E
Commands to be executed when the OK button (any chosen GPIO pin) is pressed. If there is no menu on the display, the OK button will bring it up.
OMENU[0](2)CL:CMD[16]=NUM[0]@-1;STR[11]=NUM[0];STR[11]<VALUE:
Commands to be executed when the LEFT button (any chosen GPIO pin / Rotary Encoder) is pressed.
OMENU[0](2)CR:CMD[17]=NUM[0]@+1;STR[11]=NUM[0];STR[11]<VALUE:
Commands to be executed when the RIGHT button (any chosen GPIO pin / Rotary Encoder) is pressed.
OMENU[0]
Enter MENU[0].
OMENU<E
Exit the menu.
OMENU<C
Go back to the previous menu.
OMENU<D
Menu down.
OMENU<U
Menu up.
OMENU<L
Menu left.
OMENU<R
Menu right.
OMENU<B
Menu OK.
OMENU[0]=1
OMENU[0] is displayed on OLED[1]. Valid:0-3 Default:0
Examples
Rotary Encoder menu.
GPIO[D5]INP|
GPIO[D5]CL:STR[21]=VALUE:;STR[21]>NUM[0];OMENU<B|
ROT[0]OUD|
ROT[0]BC(300)
OMENU[0](1)=STR[20]=SETUP|
OMENU[0](2)=STR[21]|
OMENU[0](3)=STR[22]=EXIT|
OMENU[0](1)CB:CMD[25]=OMENU[1]|
OMENU[0](2)CL:CMD[26]=NUM[0]@-1;STR[21]=NUM[0];STR[21]<VALUE:|
OMENU[0](2)CR:CMD[27]=NUM[0]@+1;STR[21]=NUM[0];STR[21]<VALUE:|
OMENU[0](2)CB:CMD[28]=ROT[0]OCHG|
OMENU[0](3)CB:CMD[29]=OMENU<E
OMENU[1](1)=STR[11]=Line1|
OMENU[1](2)=STR[12]=Line2|
OMENU[1](3)=STR[13]=Line3|
OMENU[1](4)=STR[14]=Line4|
OMENU[1](5)=STR[15]=BACK|
OMENU[1](6)=STR[16]=EXIT|
OMENU[1](5)CB:CMD[17]=OMENU<C|
OMENU[1](6)CB:CMD[18]=OMENU<E
GPIO button menu.
GPIO[D4]INP|
GPIO[D5]INP|
GPIO[D6]INP|
GPIO[D7]INP|
GPIO[D8]INP|
GPIO[D4]CL:OMENU<D|
GPIO[D5]CL:OMENU<U|
GPIO[D6]CL:OMENU<L|
GPIO[D7]CL:OMENU<R|
GPIO[D8]CH:STR[21]=VALUE:;STR[21]>NUM[0];OMENU<B
OMENU[0](1)=STR[20]=SETUP|
OMENU[0](2)=STR[21]|
OMENU[0](3)=STR[22]=EXIT|
OMENU[0](1)CB:CMD[25]=OMENU[1]|
OMENU[0](2)CL:CMD[26]=NUM[0]@-1;STR[21]=NUM[0];STR[21]<VALUE:|
OMENU[0](2)CR:CMD[27]=NUM[0]@+1;STR[21]=NUM[0];STR[21]<VALUE:|
OMENU[0](3)CB:CMD[28]=OMENU<E
OMENU[1](1)=STR[11]=Line1|
OMENU[1](2)=STR[12]=Line2|
OMENU[1](3)=STR[13]=Line3|
OMENU[1](4)=STR[14]=Line4|
OMENU[1](5)=STR[15]=BACK|
OMENU[1](6)=STR[16]=EXIT|
OMENU[1](5)CB:CMD[17]=OMENU<C|
OMENU[1](6)CB:CMD[18]=OMENU<E
Dual display (OMENU[1] OLED[1]).
OMENU[1]=1