Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ One C++ binary (`weather_display`) running a 1 Hz event loop:
| LED ring | `ring.cpp` | every minute |
| LCD weather | `lcd.cpp` | every `UPDATE_INTERVAL` seconds (default 600) |

All three subsystems share the main thread. Weather fetches use libcurl with a 10s total timeout so a hung HTTP call cannot stall the OLED tick.
All three subsystems share the main thread. Weather fetches use libcurl with a 15s total timeout so a hung HTTP call cannot stall the OLED tick.

Sunrise/sunset/moon math is computed locally (NOAA Solar Calculator algorithm + synodic-month moon phase). No external service is called for celestial data.

Expand Down Expand Up @@ -136,9 +136,11 @@ Two layers, in order of precedence:
"led": {
"spi_device": "/dev/spidev0.0",
"count": 16,
"brightness": 0.4,
"brightness": 0.05,
"offset": 0,
"clockwise": false
"clockwise": false,
"sleep_start": 22,
"sleep_end": 7
},
"oled": {
"format": "II:MM AP",
Expand Down Expand Up @@ -205,6 +207,19 @@ If any of these are absent the alerter is silently disabled — the rest of the

`offset` is the physical pixel that should be treated as "logical 0" (useful for putting noon at the top regardless of how the ring is mounted). `clockwise: false` reverses the direction of increasing indices around the ring. Tune these two values together until the sun's position visually matches the time of day (rising on the left, peaking at top, setting on the right).

### LED sleep hours

`sleep_start` and `sleep_end` define a local-time window (0–23, 24-hour clock) during which the ring is turned off completely. The window wraps midnight correctly, so `sleep_start: 22` / `sleep_end: 7` means off from 10 pm through 7 am.

```json
"led": {
"sleep_start": 22,
"sleep_end": 7
}
```

Set either value to `-1` to disable the feature (ring stays on at all hours). When active, the startup log shows `LED sleep hours: 22:00 - 7:00 (ring off)`.

---

## Run as a systemd service
Expand Down
Loading