Added clock

This commit is contained in:
2026-08-08 01:26:33 +01:00
parent 838e253ab1
commit a1f746fce1
3 changed files with 81 additions and 23 deletions

View File

@@ -3,6 +3,7 @@ using System.Diagnostics;
using System.Threading.Tasks;
var renderer = new MatrixRenderer("192.168.0.150"); // Your WLED IP
var ntp = new NtpService("ntp.parsons.cc");
// Replace these with your actual InfluxDB v2 credentials
// If Influx is on the same Pi, you can use the Pi's local IP and port 8086
@@ -31,8 +32,10 @@ while (true)
dbTimer.Restart();
}
DateTime now = ntp.GetCurrentTime();
// Keep pushing frames to WLED at 30 FPS
await renderer.DrawAndSendFrameAsync(currentTemp, currentWaterLevel);
await renderer.DrawAndSendFrameAsync(currentTemp, currentWaterLevel, now);
await Task.Delay(1000 / 30);