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

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
  • 71,852
  • 5
  • 76
  • 108
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
  • 62,573
  • 32
  • 113
  • 225