Added clock
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user