initial commit

This commit is contained in:
2025-05-15 16:01:28 +02:00
parent 140f58993b
commit cb4a809c60
4 changed files with 17 additions and 1104 deletions

BIN
EasyMenu.zip Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,9 @@
//Graphics and idea from https://www.youtube.com/watch?v=HVHVkKt-ldc https://github.com/upiir/arduino_oled_menu
//
// This libary is made with vibes and Claude 3.7 sonnet
// Cleaned up by Smikkelbakje
#include <Arduino.h>
#include <Wire.h>
#include <U8g2lib.h>

View File

@@ -12,13 +12,20 @@ public:
// Initialize menu
void begin();
// Add menu item with icon
// @brief Add a menu item with an icon
// @param name The name of the menu item
// @param icon The icon associated with the menu item in a bitmap array
void addMenuItem(const char* name, const uint8_t* icon);
// Set callback function for item
// @brief Set a callback function for a menu item
// @param index The index of the menu item
// @param callback The function to be called when the item is selected
void setItemCallback(int index, void (*callback)());
// Set button states
// @brief Set the button states
// @param up The state of the up button
// @param select The state of the select button
// @param down The state of the down button
void setButtons(bool up, bool select, bool down);
// Update and draw menu