https://github.com/pshapiro/cube-alarm-esp32
https://github.com/pshapiro/cube-alarm-esp32
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pshapiro/cube-alarm-esp32
- Owner: pshapiro
- Created: 2025-08-07T18:20:54.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-30T04:04:39.000Z (10 months ago)
- Last Synced: 2025-08-30T04:09:14.795Z (10 months ago)
- Language: Python
- Size: 26.5 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Cube Alarm ESP32
MicroPython firmware that turns a GAN Bluetooth cube into an alarm clock.
## Clock and alarm
- **Button A** (GP14) – hold to enter/exit time‑setting mode. While in this mode
press **A** to increment hours and **B** to increment minutes.
- **Button B** (GP15) – hold to enter/exit alarm‑setting mode. While in alarm
mode press **A** to increment hours and **B** to increment minutes.
- The cube is only polled shortly before the alarm (about 10 seconds) to avoid
draining its battery.
- Stop the alarm by solving the cube or long‑pressing **B**.
- The OLED display shows the current time in a large 12‑hour format.
## REPL helpers
For quick testing you can schedule alarms from the REPL after running
`main.run()`:
```python
import main
main.set_alarm(7, 30) # set an alarm at 07:30
main.set_alarm_in(30) # alarm 30 seconds from now
```