Writing your own SPI code compatible with Breakout Garden

Hi there,
I’ve gotten my hands on an optical flow sensor (ADNS3080) that I’d like to use with the Breakout Garden. Of course there’s no Micropython library for it, and I would like to write one - it should be relatively easy to do as it uses SPI, but I’ve never tried to program something like this before so I don’t quite know where to begin. I’ve looked at this tutorial, but I don’t know how that fits my needs. Since the Pimoroni Pico libraries are written in C directly, there’s no good example I can use by looking through their source code unfortunately.

Also, I would need the correct pins from the Breakout Garden, and looking at the schematic, I would think they are
SCK=11, MOSI=10, MISO=9 - is that right?

Is there a template for writing support for SPI devices, or is anyone able to help me along in writing something?

Hope someone can help.

I hope this helps.

The back slot uses chip select 0 (BCM 8) and BCM 18 for the GPIO pin.
The front slot uses chip select 1 (BCM 7) and BCM 19 for the GPIO pin.
Those GPIO pins are used for things like the LCD backlights.

This SPI info may help
SPI0
GPIO 7, Pin 26, CE1
GPIO 8, Pin 24, CE0
GPIO 9, Pin 21, MISO
GPIO 10, Pin 19, MOSI
GPIO 11, Pin 23, SCLK

SCLK - Serial Clock
CE - Chip Enable (often called Chip Select)
MOSI - Master Out Slave In
MISO - Master In Slave Out
MOMI - Master Out Master In

It absolutely does, thanks. The next thing is then read and writing registers, and how to read the motion from the sensor. Again, the datasheet offers contains all the register addresses, but I dont know how/what to code. I found an Arduino implementation which could possibly be ported, but I’m not sure where to start. Is there a standard way of capturing data from SPI devices, or does it differ between modules (like open/close CS, order of writing then reading, etc.)?

That’s above my skill level.
SPI Tutorial – Serial Peripheral Interface Bus Protocol Basics (corelis.com)