fix: set temperature every 5 seconds
This commit is contained in:
parent
5f819c467b
commit
9de57394c8
6
main.go
6
main.go
|
@ -34,8 +34,10 @@ func main() {
|
||||||
fmt.Printf("Using sensor %s\n", sensor)
|
fmt.Printf("Using sensor %s\n", sensor)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(5 * time.Second)
|
for {
|
||||||
ParseAndSetTemp()
|
time.Sleep(5 * time.Second)
|
||||||
|
ParseAndSetTemp()
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
fmt.Println("Starting http server on port 2112")
|
fmt.Println("Starting http server on port 2112")
|
||||||
|
|
Loading…
Reference in New Issue