examples: small refactor to metal button example that shows how to use Gobot event channels

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2016-10-18 11:31:40 +02:00
parent 589af6f44c
commit da3adc0d85
1 changed files with 5 additions and 5 deletions

View File

@ -9,15 +9,15 @@ import (
func main() {
e := edison.NewAdaptor()
led := gpio.NewLedDriver(e, "13")
button := gpio.NewButtonDriver(e, "5")
e.Connect()
led.Start()
button.Start()
led := gpio.NewLedDriver(e, "13")
led.Start()
led.Off()
button := gpio.NewButtonDriver(e, "5")
button.Start()
buttonEvents := button.Subscribe()
for {
select {