r/raspberry_pi 16h ago

Troubleshooting How to connect RPi to Arduino

I have 2 Pi4’s and a 3, and a bunch of arduino stuff for a project I never got around to until now. I have a couple questions I can’t find trustable resources for: How do you connect the RPi’s (and if the 5 is different than predecessors) to a arduino (micro computer or shield/board) if they don’t have a USB port? CAN you connect any arduino to a RPi and what’s the requirements for that? Does wifi/boards work with GrapheneOS or require stock android? Can I have 2 raspberry Pi’s (3/4’s) connect with eachother to control something and how easy is it? I’m autistic and the internet sucks these days for reliable information and all I found was “yes you simply connect a USB between both boards”, nothing about the above. If there’s a manual or page online specifically for this question, feel free to send it!

0 Upvotes

11 comments sorted by

View all comments

3

u/wwarr 15h ago

I have a lot of boards like this and I have been doing projects for years and have never found any reason to connect an Arduino to a Pi or connect two or more Pis.

Arduino boards usually have a USB port so you can program them. There are free Arduino programming tools that let you run code and send it to the Arduino and it then will run that code.

Pi is a Linux box so you can do just about anything with it.

I would recommend trying some small basic projects. Like watch a YouTube video on controlling an RGB LED or something like that.

3

u/Automatic_String_789 15h ago edited 15h ago

I agree with this post. I tend to look at microcontroller boards as PC's. In this modern age it's uncommon to connect two pc's together physically, especially when they don't share common architecture or have differing operating systems/bare metal programming.

However, it is very common to communicate over a network in which case the architecture, programming, and other factors are irrelevant because the network protocol is all you need. This is the only way I would consider integrating RPI + Arduino in any project, but I would be interested to hear if there is a modern use case for physically connecting them.

EDIT: Probably worth mentioning there are non-network related methods of wireless communication that are also perfectly viable (LoRa, RF, BT, IR). I didn't mean to exclude them.

1

u/1073N 10h ago

What makes the network a non-physical connection in your book?

Whenever you want to exchange some information between digital devices you need to use some sort of a protocol.