display-test/main.go
Andrey Egorov ae312a0457 Initial.
2024-08-20 15:14:10 +03:00

31 lines
581 B
Go

package main
import (
"display-test/display"
"fmt"
"log"
)
func main() {
log.Println("CGSG forever!!!")
if err := mainE(); err != nil {
log.Println("MAIN finished with error:", err.Error())
}
log.Println("END")
}
func mainE() error {
d, err := display.New(log.New(log.Writer(), "display", log.LstdFlags), display.SSD1306)
if err != nil {
return fmt.Errorf("new display: %w", err)
}
defer d.Close()
for {
d.Clear()
d.PutText(0, d.GetFont().Metrics().Height.Ceil(), "Satelites: 0")
d.PutText(0, d.GetFont().Metrics().Height.Ceil()*2, "Coords: 0N 0E")
}
}