Interfacing arduino with Raspberry pi


#1

How to interface Arduino with the Raspberry Pi? Can i interface multiple Arduino boards with Raspberry simultaneously ?


#2

There are a few ways of doing that. The way I’m doing it is via Ethernet / WiFi. I setup the pi as a web/mysql server and send the information from the Ardunios via the network. If you need more help let me know I’ll post a few links.


#3

Thank you :slight_smile: Please post some. I really need to start the work.


#4

@captainpc how are they connecting mega 2560 with the raspberry in this food computer?


#5

Through USB;
The Arduino is connected to the Pi trough the USB/serial port


#6

Thank you. :slight_smile:


#7

Hi @martinvgb could you please post a link to the documentation that shows how to connect the Rpi to the mega 2560 via USB? I checked https://github.com/openaginitiative and found some documentation but couldn’t find anything explaining how to connect the two together. I know how to do it via Ethernet but USB might be better for this project…
thanks!


#8

I found the following link with instructions on connecting Ardunio to Pi via USB cable and it’s working well.

The only thing missing from this guide is the python-serial component which I installed on my pi using
sudo apt-get install python-serial

One more thing… When copying/pasting the Ardunio code make sure to type in
the quote marks manually where the “Hello Pi” is otherwise you may get error when uploading the code.

Hope this helps.


#9

I am not sure I understand the question.
The interfacing is build in the Arduino and PI program ( precompiles as an IMG)
You “just” need to

  1. Load the arudino program
  2. copy the IMG of the OS for the i PI on a SD card and boot with it
  3. connect the Arduino to the PI using the USB cable

Et voilà