SPI or I2C preferences

What do people prefer as a protocol to communicate with Arduino?

General question, I don’t have any preference, just wondering.

1 Like

Hey Gerard,

Excellent question!!
Personally I2C as it seems more intuitive and is a bit more widespread. Also the addition of I2S for higher bandwidth requirements entices me to get to know it more for a project that I hope to do soon

Also I would not discount how easy it is to use UART to talk to things, microcontroller - microcontroller(MC) or MC to single-board computer, even straight into a PC with a USB-Serial adapter to talk to your favourite device (using a Raspberry Pi Pico bere instead of one has been a lifesaver for me a few times).

They definitely all have their place though. CAN or ModBus for reliable systems - robots, cars etc.
Also taking a look into wireless methods has been a real eye opener, LoRaWAN in particular seems like a whole can of worms I’d like to get right into.

2 Likes

I read the really good Tutorial here about I2C and it encouraged me to include it in an Arduino design I’m working on.

Then I thought more about the SPI and, from there, wanted to get opinions as to the good/bad/indifferent features of both.

3 Likes

Hi Gerard,

I found a decent article when I was asking the same question myself a while back:

Generally, I think the rule is: SPI for speed, I2C for simplicity/number of chips, UART/CAN for longer range stuff.

Keen to see where you go with it!
-James

2 Likes

Thanks James, that’s a great resource.

Where am I going with it? I’ve been engaged to design/implement a crop irrigation project. The plot is divided up into sections and each section needs monitoring of water/ soil moisture/ plus some odds and ends. We also need to be able to add water so maybe a hall effect transducer to ‘count’ how many litres to add.

There’s other stuff down the track but that’s a start.

:slight_smile:

Gerard

3 Likes

Hi Gerard,

That sounds pretty cool, can you post some photos of the project when it’s done? I’ve seen a lot of conceptual soil moisture monitoring stuff but not too many large scale projects that are in place and operating.

2 Likes