MCPcopy Create free account
hub / github.com/cifertech/nRFBox / settingSetup

Function settingSetup

nRFBox_V2/setting.cpp:114–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void settingSetup() {
115 Serial.begin(115200);
116
117 // Initialize EEPROM
118 EEPROM.begin(512);
119
120 // Load settings from EEPROM
121 neoPixelActive = EEPROM.read(EEPROM_ADDRESS_NEOPIXEL);
122 oledBrightness = EEPROM.read(EEPROM_ADDRESS_BRIGHTNESS);
123
124 if (oledBrightness > 255) oledBrightness = 128; // Ensure valid brightness
125 u8g2.setContrast(oledBrightness);
126
127 // Initialize buttons
128 pinMode(BUTTON_UP, INPUT_PULLUP);
129 pinMode(BUTTON_DOWN, INPUT_PULLUP);
130 pinMode(BUTTON_SELECT, INPUT_PULLUP);
131}
132
133void settingLoop() {
134 handleButtons();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected