GPIO

There are so many things about PICO-8's GPIO that I don't understand. I'm going to try and start from the info contained in the PICO-8 manual and work it all out from there.

What is a GPIO? From the PICO-8 Manual:

GPIO stands for "General Purpose Input Output", and allows machines to comunicate with each other.

Ok. So the PICO-8's GPIO allows it to communicate with other 'machines'. I'm not sure what this means so let's read on.

PICO-8 maps bytes in the range 0x5f80..0x5fff to gpio pins that can be poke()ed (to output a value -- e.g. to make an LED light up) or peek()ed (e.g. to read the state of a switch).

I understand almost nothing in that sentence :). Let's see what I can do about that...

Breaking things down further PICO-8 maps bytes in the range 0x5f80..0x5fff to gpio pins

Last things first: Google search what is a byte?

The dictionary definition provided by Google

a group of binary digits or bits (usually eight) operated on as a unit.

If a byte is 'considered as a unit of memory size'. Then for now let's say that we are mapping a 'unit of memory' to a GPIO pin. Which leads to the question: What is a GPIO pin?

On a physical device a GPIO pin is an actual metal pin that is used to connect to other 'machines' or devices. As PICO-8 is a fantasy console it doesn't have physical pins so these pins are represented by units of memory. I.e Representing one physical pin with one unit of memory.