0

Im using the command line to set the mode and value of my pins. When I use,

gpio allreadall

I can see that all my pins are set to LOW and INPUT-mode

gpio -g mode 17 out

Sets the pin to OUTPUTm but when i use

gpio -g write 17 high

The value remains LOW, but how can i set pint 17 to high.

1
  • Basically by following the instructions for WiringPi, but as this is deprecated and unsupported you would be better to use another library and tool.
    – Milliways
    Commented Jun 13, 2021 at 23:34

2 Answers 2

3

I can see no evidence that the gpio command accepts high as an alias for 1 in that command.

Use gpio -g write 17 1

1
  • Late to the party, sry! But I have tried that, multiple times, without any success....
    – Jack
    Commented Jan 8, 2022 at 14:32
0

WiringPi is deprecated and unsupported.

You can manipulate pins with the included tool raspi-gpio e.g.

raspi-gpio set 17 op
raspi-gpio set 17 dh

GPIOreadall is a replacement for gpio readall.

There are many other libraries e.g. pigpio is also included in Raspberry Pi OS.

1
  • I don't use that os, I use Ubuntu.
    – Jack
    Commented Jan 8, 2022 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.