filmov
tv
Arduino LCD 16x2 interactive menu + rotary encoder WITH CODE

Показать описание
All of the libraries i found for creating menu's on arduino were to difficult and i didnt understand them.
So this is my effort to create a menu system for Arduino combined with an LCD. My LCD is a i2c version.
The menu allows unlimited levels, and allows you to change numeric values but also text values defined in an array. The menu works with a rotary encoder that acts differently based upon single and double clicks. For example double click is return to 1st level.
Values can be changed to a maximum and minimum. You can also set the amount of increments.
The code is very rough, and the method used im sure can be way more efficient. It uses up 50% of the resources on an Arduino UNO.
I tried to comment as much of the code. Please note that this code also writes to the serial monitor. You DONT need an LCD to run this. The serial monitor i used for debugging purposes.
The download package includes all the libraries and the code.
DOWNLOAD LINK:
TODO
Store the values selected in the menu within the EEPROM. But thats planned for later.
WIRING
LCD i2c, pin A4 and A5
Rotary button, pin 8
Rotary DT, pin 2
Rotary CLK, pin 4
You can change these pins in the code.
So this is my effort to create a menu system for Arduino combined with an LCD. My LCD is a i2c version.
The menu allows unlimited levels, and allows you to change numeric values but also text values defined in an array. The menu works with a rotary encoder that acts differently based upon single and double clicks. For example double click is return to 1st level.
Values can be changed to a maximum and minimum. You can also set the amount of increments.
The code is very rough, and the method used im sure can be way more efficient. It uses up 50% of the resources on an Arduino UNO.
I tried to comment as much of the code. Please note that this code also writes to the serial monitor. You DONT need an LCD to run this. The serial monitor i used for debugging purposes.
The download package includes all the libraries and the code.
DOWNLOAD LINK:
TODO
Store the values selected in the menu within the EEPROM. But thats planned for later.
WIRING
LCD i2c, pin A4 and A5
Rotary button, pin 8
Rotary DT, pin 2
Rotary CLK, pin 4
You can change these pins in the code.
Комментарии