Can you give me an idea on how to check the statuses of specific GPIO pins if it is HIGH or LOW? My project is all about checking the statuses of GPIO pins (6 GPIO pins). I want to check all of the pins at once and if all pins are high the want to capture a photo and upload on website. I use scripting in my coding.

  • If I understand you correctly, you could use python and check if GPIO 1 is HIGH ---> if so under that if create another if that checks if GPIO 2 is HIGH. Do that for each if, nesting it under the last if and in the last one: if GPIO 6 == high --> takePhoto() and upload() where takePhoto() and upload() are functions to take the photo and upload it.
    – NULL
    Commented Apr 8, 2016 at 16:39

1 Answer 1


Using the pigpio lib you can read full 32 bit wide banks of GPIO pins at once. It also provides a pythonized interface, see here:


Returns the levels of the bank 1 GPIO (GPIO 0-31).

The returned 32 bit integer has a bit set if the corresponding GPIO is high. GPIO n has bit value (1 << n).




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.