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.

Jack
  • 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 Jun 13 '21 at 23:34

2 Answers2

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

joan
  • 67,803
  • 5
  • 67
  • 102
  • Late to the party, sry! But I have tried that, multiple times, without any success.... – Jack Jan 08 '22 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.

Milliways
  • 54,718
  • 26
  • 92
  • 182