Skip to content

could not find a pin #52

Description

@mtavano

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions