Go Down

Topic: looking for simple SPI Serial example (Read 784 times) previous topic - next topic

Tyger

Hi,

Im trying to figure out how to send and receive a simple message (tx, rx) to SPI on a arduino uno rev3.
Can someone help me?

Graynomad

Quote
to send and receive a simple message

From what?

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Tyger

some tranceiver, i have 2 arduino's so it would be like sending a message from one to the other, it doesnt matter what the message is.

Graynomad

With no details I'd say you send data using Serial.write() and you get data using Serial.available() and Serial.read().

There are a gazillion examples on this forum or have a look here

http://www.gammon.com.au/forum/?id=10894
http://www.gammon.com.au/forum/?id=11425

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

PaulS

Keep in mind that SPI and Serial are two DIFFERENT ways of communicating. Which are you trying to do?

Tyger

Serial would be nice but im using a mrf49xa so i cant get that to work because i need a clock, sdi, sdo, and cs.
So i figure why not use spi to do this. i dont see a better way to send and receive.

Graynomad

Oh SPI, maybe I should read the title :)

In that case read here

http://www.gammon.com.au/forum/?id=10892

Nick has plenty of info and sample code.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up