-
Notifications
You must be signed in to change notification settings - Fork 8
Raspberry PI
Phil Schatzmann edited this page Oct 5, 2025
·
23 revisions
You can run this emulator on an Rasperry PI
- install libgpiod-dev (sudo apt install libgpiod-dev)
- make sure that the -DUSE_RPI cmake option is set to ON
The Raspberry PI is using Linux and provides the following pins:
You need to set the -DUSE_RPI=ON option to activate the Linux API E.g:
cmake -DUSE_RPI=ON ..In linux we can use the HardwareGPIO_RPI class: by default the device gpiochip0 is used. If you want to use another device, you can indicate it in the constructor of HardwareGPIO_RPI;
Here is the PulseView output of the Blink Sketch
- activate SPI with raspi-config
By default the "/dev/spidev0.0" device is used. Here is the PulseView output of the SPI Sketch
- The sketch needs to be run with sudo
- activate I2C with raspi-config
By default the "/dev/i2c-1" device is used. Here is the PulseView output of the I2C Sketch:
- Disable Serial Console in raspi-config (Interface Options > Serial Port)
- Check in /boot/firmware/config.txt that enable_uart=1 is active
- The device /dev/serial0 is used for Serial2 when using -USE_RPI
Here is the Puseview output of the Serial2 sketch: