If you have more time to spare on this project, try to circumvent the
events / subscriber functionality. Try to see if you can read directly from
the adaptor:

https://github.com/hybridgroup/gobot/blob/master/platforms/beaglebone/beaglebone_adaptor.go#L151

so inside your work function, you would do:
*dVal, err := beagleboneAdaptor.DigitalRead("P8_8")*
*if err != nil {*
*  fmt.Println("Error reading the pin: ", err)*
*  return*
*}*
*fmt.Println("Pin read correctly, the value is: ", dVal)*

Then you would run the program while holding the button on, and off,
respectively. This way you can tell whether the most basic part of the
gobot subsystem does its job. That would be a first start at debugging.
Otherwise, just circumvent it, and read the /sys/class/gpio/[your number]
through the file system api



On Mon, Feb 12, 2018 at 1:41 AM, Curtis Paul <curtiswp...@gmail.com> wrote:

> I'm at a loss...
>
> https://godoc.org/gobot.io/x/gobot#Eventer
>
> I think the first thing is that I'm not sure I understand how to diagnose
> this code....how to validate it's doing what I think it may or may not be
> doing.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/golang-nuts/y6ZYXVsfvS0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to