This guide will walk you through Interfacing with Raspberry Pi HATs that use SPI bus.
- Any 96Boards CE Board
- Shiratech FPGA Mezzanine
- Simple SPI HAT
- For the Purpose of this guide I will be using:
Running the Demos
- The SPI ports on the Raspberry Pi headers act as a pass-through to the I2C0 Pins on the Low Speed Header.
- We first need to enable the spi pass-through:
sudo i2cset 0 0x6f 0x3a 0x00
- This means and device connected over spi via the FPGA Mezzanine should be available on
For the MPU6050, we are going to use one of the example codes from the MRAA repository:
- Fetch the code:
- Compile the code:
gcc spi.c -o spi -lmraa
- Run the code:
- You should see all the LEDs in the Matrix light up one by one.