gpio: report all errors from calls to embd.DigitalWrite, DigitalRead, and SetDirection

Issue #37 resolved
Trek Hopton created an issue

embd.DigitalWrite, embd.DigitalRead and embd.SetDirection all can return errors but in gpio.go the errors are not always checked. The errors should be checked and returned if necessary otherwise it is difficult to debug when something goes wrong.

When I didn’t have permissions set to write to gpio on a pi, the error was missed because it wasn’t returned. This happened in the WritePin function.

Comments (1)

  1. Log in to comment