0
votes

I have a Raspberry Pi Zero and Arduino Uno setup for SPI communication with me. I now need to write programs to send some data, say the numbers 1 - 10 via the serial ports of the Arduino and then receive the same data through the Pi and display it (say on the console).

Could anyone help me with the exact workflow to perform the above 'test'?

1
What have you tried so far? Show us some code! - Klaus D.
I haven't written any code yet. Was hoping someone could point me to the right tutorials and help lay out a general workflow, if possible. - sujaypatil

1 Answers

0
votes

Sending data from the Arduino via the SPI interface is achieved by using the transfer function in the arduino SPI library.

The SPI library can be found here: https://www.arduino.cc/en/Reference/SPI

The above reference will teach you about the SPI interface and the various function calls you'll need to perform in order to get your desired effect.

Once you've mastered that, a good tutorial to help get you started would be this: https://www.arduino.cc/en/Tutorial/DigitalPotControl

Finally, a more indepth tutorial would be this: http://robotics.hobbizine.com/raspiduino.html . I've only skimmed the reference but it should be exactly what you're looking for.

Hope that helps!