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

Get pin status #51

Open
abonec opened this issue Jul 7, 2017 · 0 comments
Open

Get pin status #51

abonec opened this issue Jul 7, 2017 · 0 comments

Comments

@abonec
Copy link

abonec commented Jul 7, 2017

I write a program to turn on my computer via telegram bot here:
https://github.com/abonec/remote-wol/blob/d728333c554d0afb7bb31b3fc3dfb0960deef49d/gpio.go#L30
I use hwio to turn a relay on and off to short the power button. Now, this part of the program is dead simple and no way to going wrong. But while developing I faced with situations where relay turned on but because of my fault, it stays in this state. It is bad for PC.

Is there some way to check pin state? I want to run a watchdog which every second will check this pin and turn it off if it is turned 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

1 participant