User UI - tnl3pdx/SleepBud GitHub Wiki
For user interface, the following libraries are used for implementation:
11/8/2024 (Truong) - Preferences for Clock Menu
Pre-UI Requirements:
- For the situation that the clock loses power, data such as sleeping time, brightness, and time offset all need to be saved.
- To do this, the ESP32 S3 has an internal non-volatile flash, meaning that data can be stored even after power is cut off.
- sleepBud has a namespace called "config" which can be accessed in different R/W permissions (refer to Preferences library for more details).
6 items are stored in this namespace:
- (bool) timeUpdate: determines if clock updates time from NTP server at reboot
- (int) brightness: brightness value set by user for lamp
- (int) sleepHR: time of sleep hour
- (int) sleepMin: time of sleep minute
- (int) utcOffset: time offset for correcting UTC time to local time
- (bool) configInit: checks if namespace has been initialized on ESP32
Note: Alarm time is not saved on ESP32 flash, it is already saved on the RTC module.
11/14/2024 (Truong/Ameer)
Mode Selection
During normal operation, the plus and negative buttons will adjust the brightness of the lamps
These modes will be handled based on an interrupt service provider.
- Update from WiFi at bootup
- Setup manual time
- Turn on Alarm
- Set Alarm Time
- Set UTC offset
- Normal Mode