Esempio n. 1
0
//FlashDisplay will trigger the LCD's display on and off
func flashDisplay(display *hd44780.HD44780, repetitions int, duration time.Duration) {
	for i := 0; i < repetitions; i++ {
		err := display.BacklightOn()
		utils.LogErrorandExit("Failed while flashing display", err)
		time.Sleep(duration / 2)
		err = display.BacklightOff()
		utils.LogErrorandExit("Failed while flashing display", err)
		time.Sleep(duration / 2)
	}
}