-
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
- make sure that the -DUSE_RPI cmake option is set to ON
- install libgpiod-dev (sudo apt install libgpiod-dev)
- activate SPI and I2C with raspi-config
The Raspberry PI is using Linux and provides the following pins:
You can 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
In Linux we can use the HardwareSPI_RPI class: by default the device "/dev/spidev0.0" is used. If you want to use another device, you can indicate it in the constructor of HardwareSPI_RPI;
Here is the PulseView output of the SPI Sketch
- Disable Serial Console in raspi-config (Interface Options > Serial Port)
- Check in /boot/config.txt that enable_uart=1 is active
- The device /dev/serial0 is used for Serial3