Hey all,
I’m trying to add this Adafruit Airlift module to my 3PI+ 2040 board so I can do some robot-robot communications. These connect over SPI.
I see the SPI0-TX pin listed on the https://www.pololu.com/file/0J1941/3pi-2040-control-board-pinout.pdf diagram, but I don’t find the matching SPI0-RX pin anywhere. How do I send data into the 2040 without an exposed RX pin?
Anybody able to help me with this?
Thanks!
Like you, I don’t see a fully exposed SPI set of pins that you wouldn’t need to share with existing hardware on the 3π+. However, you could use the free GP27-GP29 pins with a PIO implementation of SPI that would get you similar performance on the RP2040.
Hello.
I moved your post to the Robots section of the forum since it seems more appropriate.
You can find some information about this in the “Adding electronics” section of the 3pi+ 2040 user’s guide, under the “Adding an SPI device” heading. You might also find the “Pin assignments” section helpful.
Essentially, pins GP0, GP4, GP16, and GP20 can all be configured as SPI0 RX, and those pins are available on the 3pi+ 2040 robot (shown in the diagram you linked to); however, they are all already used for the robot’s various other features. If you do not need one of those features, you can use the associated pin for SPI0 RX instead (although you should be careful not to initialize that feature in your code after configuring it for SPI).
Alternatively, you might consider using SPI1 since you can configure GP27 for TX and GP28 for RX, both of which are free on the 3pi+ 2040 robot and accessible on the mid expansion header
Brandon