Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"OK" LED is 17th GPIO pin #3

Open
muellermartin opened this issue Apr 21, 2015 · 2 comments
Open

"OK" LED is 17th GPIO pin #3

muellermartin opened this issue Apr 21, 2015 · 2 comments

Comments

@muellermartin
Copy link
Contributor

I think there is an off by one error in the naming of the OK LED: Since lesson OK01 the "OK" LED is decribed to be the 16th pin, but now I'm pretty sure it actually is the 17th pin, because the GPIO pin numbering starts at zero and of course by looking at all the offsets for setting the GPIO function and the output. The pin is referred to as "GPIO16" but there is also a "GPIO0" pin.

@Chadderz121
Copy link
Owner

Hmm, this is an interesting one. The debate here is, is the GPIO0 pin the "first (1st)" pin or the "0th" pin. Looking at my descriptions, I also talk about the 16th bit in a register, which implies I have a 0th bit. Perhaps it's worth a clarifying comment to be explicit about what I mean. Alternatively it could be rewritten to say "pin 16" and "bit position 16" with a note somewhere saying that "pin 0 is the first pin". It may even be a nice opportunity to describe off by one errors 😉

@muellermartin
Copy link
Contributor Author

Yes, definitively! I have a programming background, so I'm somewhat used to count from zero, but I guess it can be difficult for newcommers.
I like the idea to use different naming "pin 16" vs. "bit position 16" (although this still is ambigous if there was no prior notice whether there is also a 0th bit/pin). Maybe this can be underlined with an indicator (color, symbol, etc.) to always make clear which counting method is used and a box explaining the meaning of the indicators.
It could be quite useful to explain the off-by-one error, e.g. in the troubleshooting section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants