For years, there has been a clear distinction between the Arduino and Raspberry Pi boards ... you can access one UART (pins D0 and D1 as RX and TX), one SPI (pins D10 to D13 as SS, MOSI, MISO ...
The first thing you have to be careful about, especially when you are not used to the Arduino IDE, is to check carefully if you can inject a simple sketch on your target that you want to transform ...