gpio
gpio copied to clipboard
GPIO for Go
BeginWatch(Edge, IRQEvent) could have a more Go like API to handle events like signal.Notify https://golang.org/pkg/os/signal/#Notify
I ran the sample program on my Raspberry Pi model B. It worked but when I sent `SIGINT` to the application, it resulted in a panic: ``` panic: EpollWait error:...
The sleep values are somewhat arbitrary (not sure what they should be in reality), but I think it's fine since the Python RPi library just does a NOP for 150...
To get the PCB revision (because at least two pins are different) you should add to gpio_linux.go something like: ``` go var pcbRevision int func PcbRevision() int { return pcbRevision...
If there is an error, file.Close() is not called at: https://github.com/davecheney/gpio/blob/6614a0263d2d66ff58368d2ff0f46556b17dac9d/gpio_linux.go#L137
According to "Tv`" on #go-nuts, the IRQ stuff shouldn't use epoll: ``` Go subsumes that into the language itself. Just read from a file descriptor and your goroutine will see...
SetMode, Set, Clear all do not return any kind of error. This is bad. Currently we have a mixture of "last error" and returning an error. We should probably choose...
We have several ways of writing to various files. We should clean this up.
There are a variety of pin designations on the Raspberry Pi. We need to have constants for all of them with appropriate descriptions of what they actually refer to so...