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

about to set pin <Number> to output #47

Open
mtavano opened this issue Mar 1, 2017 · 1 comment
Open

about to set pin <Number> to output #47

mtavano opened this issue Mar 1, 2017 · 1 comment

Comments

@mtavano
Copy link

mtavano commented Mar 1, 2017

I'm trying to set high and set low the gpio number 16 (corresponding to pin number 36) where I've a relay connected. mi code looks no more different than the code you've exposed on Readme.

when I execute the binary on my raspberry pi2 I've got the following output

about to set pin 36 to output

and nothing else, either the switch sound when a relay gets an order

I'm executing the binary as sudo. There is something I'm forgetting or doing wrong?

@mrmorphic
Copy link
Owner

Hmmm, is the relay connected directly to the GPIO? The maximum current for a GPIO pin is about 16mA, and non-solid-state relays typically require a bit higher than that. It may not have enough power to switch the relay state. One thing to try is putting an LED with current limiting resistor on the pin, to see if it's switching.

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