Exemplo n.º 1
0
// check if button is pressed
func buttonHandler(p gpio.Pin) {
	for {
		if p.Get() {
			ctrlChan <- true
		}
		time.Sleep(150 * time.Millisecond)
	}
}