Пример #1
0
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()
	}
}
Пример #2
0
Файл: lcd.go Проект: zyxar/berry
func initLcd() {
	lcd = pcd8544.OpenLCD(19, 26, 13, 5, 6, 60)
}