To use the GPIO pins on the Raspberry Pi, I have written my own access library and modeled it on the Arduino Wiring system. It started life as the means to allow my BASIC to access the GPIO pins, but I’ve now tidied it up and released it as a library in its own right.
All the details are here.