initial commit
This commit is contained in:
BIN
EasyMenu.zip
Normal file
BIN
EasyMenu.zip
Normal file
Binary file not shown.
1102
example/Graphics.h
1102
example/Graphics.h
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user