User avatar
coskukoz
Posts: 34
Joined: Sun May 31, 2015 4:01 pm
Location: Balıkesir, Turkey

SPI Communication between of Raspberry Pi and Arduino

Sat Apr 29, 2017 1:57 pm

Hey guys!

I made very basic project by using arduino. My arduino reads temperature sensor. That's all.

Now I want to see temperature values on Raspberry Pi by Python. And the communication will be SPI.
I made this connections on this page: http://mitchtech.net/raspberry-pi-arduino-spi/

Actually there is C code on the page. But I want to make it by Python.

Do you guys know how can I get data from Arduino by this way?

Thanks in advance.
Cheers.
cactiapps.blogspot.com

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: SPI Communication between of Raspberry Pi and Arduino

Sun Apr 30, 2017 11:38 am

coskukoz wrote: Actually there is C code on the page. But I want to make it by Python.

Do you guys know how can I get data from Arduino by this way?
Look for some examples for using spidev with python, I'm sure there's plenty out there that could be adapted fairly easily. From a very quick scan of that C code for the Pi I don't think it's doing very much for the actual data transfer (most of it is giving options to configure the SPI interface in different ways)

vickey97
Posts: 37
Joined: Tue Jul 24, 2018 2:16 pm

Re: SPI Communication between of Raspberry Pi and Arduino

Sun Jan 06, 2019 2:19 pm

coskukoz wrote:
Sat Apr 29, 2017 1:57 pm
I made very basic project by using arduino. My arduino reads temperature sensor. That's all.

Hey, Did you completed your project on this?
coskukoz wrote:
Sat Apr 29, 2017 1:57 pm
I made this connections on this page: http://mitchtech.net/raspberry-pi-arduino-spi/
Does this connections work because AFAIK you need level shifter between both arduino and RPi
coskukoz wrote:
Sat Apr 29, 2017 1:57 pm
Actually there is C code on the page. But I want to make it by Python.
If you've completed this project can you show me your python script so I could know more about SPI with python(Maybe SPIDEV).

vickey97
Posts: 37
Joined: Tue Jul 24, 2018 2:16 pm

Re: SPI Communication between of Raspberry Pi and Arduino

Sun Jan 06, 2019 2:21 pm

mfa298 wrote:
Sun Apr 30, 2017 11:38 am
Look for some examples for using spidev with python, I'm sure there's plenty out there that could be adapted fairly easily. From a very quick scan of that C code for the Pi I don't think it's doing very much for the actual data transfer (most of it is giving options to configure the SPI interface in different ways)
If by any chance, do you have any SPIDEV code that I can refer for my Communication between RPi and Uno? If yes please share it over. :)

Return to “Beginners”