func main() { flag.Int64Var(&step, "step", 5000, "clock step") flag.Parse() lcd = pcd8544.OpenLCD(19, 26, 13, 5, 6, 60) core.Delay(500) ch := make(chan os.Signal, 1) signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM) go func() { for s := range ch { fmt.Printf("%v caught, exit\n", s) lcd.Reset() os.Exit(0) } }() for { loop() } }
func initLcd() { lcd = pcd8544.OpenLCD(19, 26, 13, 5, 6, 60) }