Okay, how do you use the GPIO on the Raspberry Pi again? I’m wondering about the whole thing, what is “pull up” and “pull down”? Why is it conspicuously missing from the Raspberry Pi Quick Reaction Game tutorial? What is this “gpiozero” library? Okay, for the answers. So I searched for GPIO Zero, and I found the Raspberry Pi blog post on it. Basically, its name GPIO Zero is inspired by PyGame Zero, the “zero” being added to the name so that the library can be used with a minimum of boilerplate code. And if you read the blog post on it, in fact the creation routines like “Button” is deliberately designed to mask the user from needing to configure whether a GPIO input is “pull up” or “pull down,” instead assuming the common “pull up” by default. As the blog post says, although this is important to know about electronics, it is not necessary if all you want to do is create some simple interactive setup for a classroom activity. So there you go, that’s why mention of “pull up” and “pull down” is conspicuously missing from the Raspberry Pi GPIO quick reaction game. It probably got rewritten after the advent of GPIO Zero, but before that, there may have been an older version that introduced the pull up and pull down concepts.
- Let me state the answer to the question more clearly here, though. “Pull up” means that a transition from 3.3V to 0V is a transition into the “on” state, “pull down” means that a transition from 0V to 3.3V is a transition into the “on” state.