diff --git a/config.go.example b/config.go.example index 54514f8..9e130e8 100644 --- a/config.go.example +++ b/config.go.example @@ -1,5 +1,9 @@ package main +import ( + "time" +) + const ( WifiSSID = "My Wifi Name" WifiPass = "SecretWifiPassword" @@ -12,4 +16,6 @@ const ( NodeName = "Studio Weather" NodeID = "studio_env" ClientID = "pico2w_studio_env" + + UpdateInterval = 30 * time.Second ) diff --git a/main.go b/main.go index 321081c..89f3c96 100644 --- a/main.go +++ b/main.go @@ -346,6 +346,6 @@ func main() { } } - time.Sleep(30 * time.Second) + time.Sleep(UpdateInterval) } }