User avatar
The Monkey
Posts: 25
Joined: Sun Mar 26, 2017 9:55 pm
Contact: Website

Arduino + Pi

Thu Mar 30, 2017 4:37 pm

Is it possible to use an Arduino with a Pi and if so do you have a link to a website with a project using both.

scotty101
Posts: 3753
Joined: Fri Jun 08, 2012 6:03 pm

Re: Arduino + Pi

Thu Mar 30, 2017 4:48 pm

Yes.

What do you want to do? Receive data from the Arduino on the Pi or Send data from the Pi to the Arduino?

Either way, firmata is a simple method of communicating between the two

https://raspberrypi-aa.github.io/session3/firmata.html
http://madeformakers.org/using-firmata- ... pberry-pi/
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
The Monkey
Posts: 25
Joined: Sun Mar 26, 2017 9:55 pm
Contact: Website

Re: Arduino + Pi

Thu Mar 30, 2017 4:53 pm

scotty101 wrote:Yes.

What do you want to do? Receive data from the Arduino on the Pi or Send data from the Pi to the Arduino?

Either way, firmata is a simple method of communicating between the two

https://raspberrypi-aa.github.io/session3/firmata.html
http://madeformakers.org/using-firmata- ... pberry-pi/
Thank you, I will look into these links. But can you also control a Arduino with a pi with no second computer?

User avatar
scruss
Posts: 2636
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Arduino + Pi

Thu Mar 30, 2017 5:42 pm

Yes, that's what the links you were given do.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
The Monkey
Posts: 25
Joined: Sun Mar 26, 2017 9:55 pm
Contact: Website

Re: Arduino + Pi

Thu Mar 30, 2017 5:53 pm

scruss wrote:Yes, that's what the links you were given do.
Oh it seemed like they were connected to a different computer.

User avatar
scruss
Posts: 2636
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Arduino + Pi

Fri Mar 31, 2017 3:17 pm

You can install the Arduino IDE on a Raspberry Pi, but it's not very fast and needs a keyboard and display
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
The Monkey
Posts: 25
Joined: Sun Mar 26, 2017 9:55 pm
Contact: Website

Re: Arduino + Pi

Fri Mar 31, 2017 6:05 pm

scruss wrote:You can install the Arduino IDE on a Raspberry Pi, but it's not very fast and needs a keyboard and display
I do have both of those

hdtodd
Posts: 37
Joined: Tue Mar 04, 2014 1:53 am

Re: Arduino + Pi

Sat Apr 01, 2017 9:59 pm

I have my Arduino connected to one of my RPi's for data collection. The code is here for both the Pi and the Uno:
https://github.com/hdtodd/WeatherStation.

The key to making this work was the rs232 package by Teunis van Beelen, http://www.teuniz.net/RS-232/, which provides RS232 service over the USB connection (look at the table at the bottom of this web page to see which ports are available on which systems).

My setup is:
  • *Arduino connected (in this case to a Raspberry Pi-2B) via USB cable
    *Power supply to RPi sufficient to power both Pi and Uno (2.5A in my case, I think)
    *Pi connected to network via WiFi (Edimax dongle)
A Pi-2B or Pi-3B has sufficient performance to run the Arduino development environment reasonably well, in my opinion, and I do all my development on the Pi in this case. But I've also connected the Uno to my Mac and done development that way occasionally, too, just to make sure I can.

But in my case, I wanted the Pi to control the data collection process, store the data in a database, and display the results on a web page on demand, so it's usually more convenient to do the development and run the operation from the Pi.

Good luck! These are fun to work with!

David

Return to “Other projects”