I worked with hwio the past February, and everything worked OK, but now when I've tried to work with the same codebase, this error message came up: Could not find a pin called gpio2
my code looks like this
package main
import (
"log"
"github.com/mrmorphic/hwio"
)
func main() {
gpio, err := hwio.GetPinWithMode("gpio2", hwio.OUTPUT)
check(err)
defer hwio.CloseAll()
err = hwio.DigitalWrite(gpio, hwio.HIGH)
check(err)
err = hwio.DigitalWrite(gpio, hwio.LOW)
check(err)
}
func check(err error) {
if err != nil {
log.Fatal(err)
}
}
Ofcourse, I've tried with many differents pins.
I worked with hwio the past February, and everything worked OK, but now when I've tried to work with the same codebase, this error message came up:
Could not find a pin called gpio2my code looks like this
Ofcourse, I've tried with many differents pins.