05-17-2018, 01:18 PM
(This post was last modified: 05-17-2018, 03:51 PM by TheOldPresbyope.
Edit Reason: clarified gpio readall
)
(05-16-2018, 02:03 PM)Tim Curtis Wrote: Try the gpio cmd
Code:pi@rp3:~ $ gpio
Usage: gpio -v
gpio -h
gpio [-g|-1] ...
gpio [-d] ...
[-x extension:params] [[ -x ...]] ...
gpio [-p] <read/write/wb> ...
gpio <read/write/aread/awritewb/pwm/clock/mode> ...
gpio <toggle/blink> <pin>
gpio readall/reset
gpio unexportall/exports
gpio export/edge/unexport ...
gpio wfi <pin> <mode>
gpio drive <group> <value>
gpio pwm-bal/pwm-ms
gpio pwmr <range>
gpio pwmc <divider>
gpio load spi/i2c
gpio unload spi/i2c
gpio i2cd/i2cdetect
gpio rbx/rbd
gpio wb <value>
gpio usbp high/low
gpio gbr <channel>
gpio gbw <channel> <value>
pi@rp3:~ $
For those of you following along at home, the version of gpio in my moOde player doesn't know about the new RPi 3B+ and the readall option fails (other options apparently do work, however).
Code:
pi@moode:~ $ gpio readall
Oops - unable to determine board type... model: 13
pi@moode:~ $ gpio -v
gpio version: 2.44
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
Raspberry Pi Details:
Type: Unknown13, Revision: 03, Memory: 1024MB, Maker: Sony
* Device tree is enabled.
*--> Raspberry Pi 3 Model B Plus Rev 1.3
* This Raspberry Pi supports user-level GPIO access.
Do not follow Gordon's wiringPi update instructions in his Mar 14 post to wiringpi.com. As of today, at least, his wiringpi-2.46-1.deb file still contains gpio v2.44 (and yes, I've messaged him about it).
Instead clone his repo and build a fresh wiringPi
Code:
git clone git://git.drogon.net/wiringPi
cd wiringPi
sudo ./build
Now,
Code:
pi@moode:~ $ gpio -v
gpio version: 2.46
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
Raspberry Pi Details:
Type: Pi 3+, Revision: 03, Memory: 1024MB, Maker: Sony
* Device tree is enabled.
*--> Raspberry Pi 3 Model B Plus Rev 1.3
* This Raspberry Pi supports user-level GPIO access.
and 'gpio readall' reads all the pins on the RPi 3B+.
Regards,
Kent