User avatar
Imperf3kt
Posts: 2981
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

[solved] How do I check the status of a GPIO from the terminal?

Tue Nov 19, 2019 11:48 pm

I'm trying to control the Pi GPIO via a program called Ren'Py. In order to do so I need to import RPI.GPIO into Ren'Py and write some functions that will toggle the GPIO pins high/low

I'm looking for a way to check if everything works without having to wire up an LED or some other hardware. Is there a way to see the output of a GPIO from within the terminal?
Last edited by Imperf3kt on Wed Nov 20, 2019 9:24 pm, edited 1 time in total.
55:55:44:44:4C
52:4C:52:42:41

dustnbone
Posts: 91
Joined: Tue Nov 05, 2019 2:49 am

Re: How do I check the status of a GPIO from the terminal?

Tue Nov 19, 2019 11:56 pm

I think it's just gpio read

More info on the gpio command here

http://wiringpi.com/the-gpio-utility/

User avatar
Imperf3kt
Posts: 2981
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How do I check the status of a GPIO from the terminal?

Wed Nov 20, 2019 12:06 am

Thanks, that's far simpler than I would have thought.
55:55:44:44:4C
52:4C:52:42:41

User avatar
neilgl
Posts: 1187
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: How do I check the status of a GPIO from the terminal?

Wed Nov 20, 2019 11:32 am

or maybe use raspi-gpio

Code: Select all

raspi-gpio get [GPIO]
raspi-gpio set <GPIO> [options]

User avatar
Imperf3kt
Posts: 2981
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: [solved] How do I check the status of a GPIO from the terminal?

Wed Nov 20, 2019 9:29 pm

More options, thank you.
55:55:44:44:4C
52:4C:52:42:41

Return to “Beginners”