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

sensing system command return code wiki error #251

Open
tbmale opened this issue Sep 24, 2022 · 0 comments
Open

sensing system command return code wiki error #251

tbmale opened this issue Sep 24, 2022 · 0 comments

Comments

@tbmale
Copy link

tbmale commented Sep 24, 2022

The sensing system command return code should be
0 - off 1 - on

As for the commands, I've made the work with:

  • switch on
    sh -c "echo 1 > /sys/class/gpio/gpio226/value"

  • switch off
    sh -c "echo 0 > /sys/class/gpio/gpio226/value"

  • sensing
    expr `cat /sys/class/gpio/gpio226/value` == 1

The wiki writes Commands on *nix systems will be executed within the sh interpreter.

... but the only way to make them work was spawning my own with sh .

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