Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not find a pin #52

Open
mtavano opened this issue Sep 20, 2017 · 2 comments
Open

could not find a pin #52

mtavano opened this issue Sep 20, 2017 · 2 comments

Comments

@mtavano
Copy link

mtavano commented Sep 20, 2017

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.

@mrmorphic
Copy link
Owner

That's odd. There have been no changes in the library that would effect that. What device are you using? Also, have there been any updates to the device?

@mrmorphic
Copy link
Owner

I've created issue #53 in order to add board revisions that are currently missing from driver selection. If you're running the same code on a model 3 board, this is probably what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants