Raspberry Pi Sense HAT Emulator
Raspberry PiE is a C library that emulates the Sense HAT of a Raspberry Pi in the terminal. Its function signatures match the Libsense library used in CISC 210 at the University of Delaware. One program links against either library: compile against Raspberry PiE to develop without hardware, then against Libsense to run on the Raspberry Pi.
• Drop-in:
#include "sense.h" becomes #include "piemulator.h", and -lsense becomes -lpie• The arrow keys act as the joystick, and Enter/Return acts as the joystick button
• Written in C and POSIX compliant. No Windows build; ports welcome
Trying it
• Clone raspberry-pie and run the build script
• Compile a Sense HAT program against the library:
gcc -o example example.c -lpie• Run it, and the LED matrix renders in your terminal
Status
The library is a work in progress for quick testing and on-the-go development. A pixel write outside the LED matrix bounds draws nothing instead of segfaulting as it does on the real hardware. Run a final test on the Raspberry Pi before relying on the result.