the situation is a little messy!
let’s look at this nice site: https://pinout.xyz/pinout/wiringpi
the top-left pin is the first pin a human will see, its role is 3v3 power, and it does not have other number or name
the pin under it is physically the third pin, it does not have a specific role (that what «general purpose input-output» means: they could be used to connect to lights, buttons, etc), it’s called gpio 2, and the once very popular library wiringpi calls it pin 8, so pico-8 will call it 8 too
for another example, the pins documented here https://pinout.xyz/pinout/i2c can be used for the i²c communication protocol to connect to other components; in this mode, specific pins have specific roles and must be connected accordingly (so they’re not general-purpose there)
the docs tell us «0x5f80..0x5f9f mapped to wiringPi pins 0..31», so 0x5f80 (or 24448 if you prefer, hex notation is just more usual and shorter but both mean the same number) + 8 will give you the memory address to read or write that pin (0x5f88)
from the docs: https://www.lexaloffle.com/dl/docs/pico-8_manual.html#GPIO
[Please log in to post a comment]