I'am trying to initiate a two way communication between Raspberry pi and Arduino. I worked with spidev library and directly using the SPDR register in the Arduino micro-controller without being able to achieve any form of communication between the two.
I even removed the MOSI pin of pi and connected it to MISO pin of the pi The received and transmitted data were different..... Is SPI communication Reliable..? What all other means can I use to establish a stable communication between the raspberry pi and Arduino
-
Show us your actual connections and code so we can help.evildemonic– evildemonic2018年11月16日 22:37:00 +00:00Commented Nov 16, 2018 at 22:37
1 Answer 1
Of course SPI on the Pi is reliable.
There are a couple of things to note:
- the Pi always acts as the SPI bus master.
- All the Pi GPIO (including SPI) are 3V3 only. Arduinos are typically 5V. You must not expose a Pi GPIO to more than 3V3.
-
I used Pi as the bus master and used a logic level converter to connect pi and arduinojesvin palatty– jesvin palatty2018年11月16日 11:43:20 +00:00Commented Nov 16, 2018 at 11:43
-
@jesvinpalatty You need to edit your question and provide clear photos of the connections if you want help. Many things could be wrong with the wiring. Software listings would be useful as well.joan– joan2018年11月16日 12:35:31 +00:00Commented Nov 16, 2018 at 12:35