cpainchaud / RFLink32

RFLink for ESP, with MQTT client
Other
118 stars 44 forks source link

Different pins for SPI? #104

Closed ropg closed 6 months ago

ropg commented 6 months ago

Hello there. I would like to run this on the M5Stack series of ESP32 devices, such as the M5Atom. I'm thinking of using the RFM69 transceiver. The M5Stack devices are all a bit different, but often do not provide easy access to pin 18. The M5Atom uses pins 19, 23 and 33 for SPI, and presumably that's also in the board definition file. How hard would it be to use these different pins for this?

(Now that I take a better look at the code, I notice that 1_radio.cpp includes SPI.h but then I cannot find where any code ever uses SPI. I probably just don't understand.)

image
ropg commented 6 months ago

I figured it out already, the README says it must use the pins stated, but it will just use whatever is in the pins_arduino.h for the current variant. It might be nice to be able to specify the SPI pins as well so you can override without having to create a new variant, and so that all the pins for the radio are in one place.