Is there some way I can communicate between my Raspberry Pi Zero and my Photon over analog pins 5, 6 and 7? I need to use these pins since I have a PCB made which limits my options for using the proper pins for the built in I2c/Serial/SPI functions of the Photon.
How well can any of these communication protocols be done in software on the Photon? Is there a better way that I’m not thinking of? I do not have vast amounts of data to transfer between the two devices, most of the time no update needs to be made on the photon and I could just send a ‘no_update’ packet. Other than that I shouldn’t need to send more than 10 -20 bytes at a time.
@Steven4755, using software SPI works very well actually. Of course not as fast as hardware SPI but quite fast nonetheless. If the Photon will be a dedicate slave (?) then three pins will be fine (MOSI, MISO and CLK) since the Slave Select line is not needed. If you need some code snippets, let me know.
Great news that you can do SPI without the 4th line. If you want to post some snippets that’d be great but I’m sure I can google up some other implementations if not.
Thanks for the link, but the built in SPI functions only allow for certain pins to be used and I already am using them. Unless I'm missing a section on using non-default ports then I cant use this.
@Steven4755, the snippet assumes that the Particle device is a Master device. If the rPi is the Master, then the code will not work. Just a reminder that the extra CS pin was omitted assuming the Photon and the rPi have a dedicated bus (no other SPI devices).