in memory. PICO-8 will automatically set a pin to read mode when you peek the memory address or write mode when you poke to the address.
var pico8_gpio = new Array(128);
You can then write to the bytes like so :
pico8_gpio = 10;
In the hardware implementations, the GPIO pins act digitally, with 0 representing 0 and 255 representing 1. Also, hardware implementations may not support all 128 pins. Raspberry Pi, for instance, reportedly only supports the first 8 pins.
Raspberry Pi SetupEdit
Raspberry Pi B+Edit
On a Raspberry Pi B+ model, no additional setup was necessary (using v0.1.10). Run the pico8 binary via
to enable access to the GPIO pins. If you do not use sudo to run PICO-8, the program will crash with a WiringPi error when your cart tries to access the GPIO memory space.
Raspberry Pi 2 and newer modelsEdit
On newer Raspberry Pi models, the version of WiringPi included in the statically-linked pico8 binary.* Instead, you will have to build and install SDL 2.0.5 from source as well as a more recent version of WiringPi. Then, use the pico8_dyn binary to run PICO-8.
*Is it included? Is it not included? What is the issue here? Would appreciate someone with a Raspi 2 or newer clarifying what this means in less broken English. Feel free to delete this when done.
On older models of the Raspberry Pi than the B+ model, GPIO may not work at all with PICO-8.
TODO: document experience using PocketChip with PICO-8. Example: I think we had to install a newer (unofficial?) version of PICO-8 using the Debian package manager.