immaturespartan
Posts: 3
Joined: Fri Sep 20, 2013 3:02 am

Pi to Arduino due communication for a robot(help!)

Fri Mar 21, 2014 10:48 pm

I am building a one wheel balancing, voice recognition/talking, ClapTrap robot with Arduino due but I need good image processing from the Pi (i have a pi w/ camera) I have the servo shield, a motor driver, all of the other components, and a motorcycle battery powering it, but i cannot program in arduino very fluently and I have no idea how, or if I can even get the two boards talking to each other.

jsobota
Posts: 42
Joined: Tue Jul 10, 2012 3:24 pm
Location: Plzen, Czech Republic

Re: Pi to Arduino due communication for a robot(help!)

Sat Mar 22, 2014 11:54 pm

Yes, RasPi and Arduino are a perfect couple. They can communicate via USB cable or I2C bus. I have no experience with Arduino DUE, but RasPi and UNO work great:
http://www.rexcontrols.com/articles/rex ... ts-arduino

User avatar
shawny
Posts: 14
Joined: Sun Feb 02, 2014 1:21 pm
Location: Prague, Czech Republic

Re: Pi to Arduino due communication for a robot(help!)

Sun Mar 23, 2014 11:23 am

We are working on a project to connect Raspberry Pi and Arduino via USB cable. By using the shared library, your application on Pi can control Arduino to do whatever you want. You can find details on this page: http://www.uugear.com/uugear-rpi-arduino-solution/
Cool stuff for Raspberry Pi, Arduino and more: http://www.uugear.com/
Raspberry Pi + Arduino Solution: http://www.uugear.com/uugear-rpi-arduino-solution/

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

Re: Pi to Arduino due communication for a robot(help!)

Sun Mar 23, 2014 3:48 pm

immaturespartan wrote:I am building a one wheel balancing, voice recognition/talking, ClapTrap robot with Arduino Due …
Can you break it down a bit for us, please? Yes, you can talk to an Arduino in many ways, but not all of them will be helpful to what you're trying to do.

What will the Arduino be doing? Spinning up the motors to drive the wheel? Reading balance/force information? Driving the talker?

Will the Raspberry Pi just be taking pictures, or does it need to do some heavy processing stuff, like finding resonant frequencies of the wheel?

Stewart
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Patrick222122
Posts: 80
Joined: Sun Dec 02, 2012 5:51 pm

Re: Pi to Arduino due communication for a robot(help!)

Sun Mar 23, 2014 4:05 pm

WHat programming language are you using. My own robot uses python and I have had trouble in the pass reading data from arduino.

immaturespartan
Posts: 3
Joined: Fri Sep 20, 2013 3:02 am

Re: Pi to Arduino due communication for a robot(help!)

Sat Mar 29, 2014 10:11 pm

I am just going to use the default arduino ide program.
I just need the pi to somehow control the movement of the balancing act.

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Pi to Arduino due communication for a robot(help!)

Sat Mar 29, 2014 10:39 pm

immaturespartan wrote:I am just going to use the default arduino ide program.
I just need the pi to somehow control the movement of the balancing act.
If the Pi is controlling the movement, what is the Arduino doing? What messages need to be passed in each direction between the two?
Examples that I can think of include:
Sensor data (if so, in which direction?)
Command data (if so, what commands? In which direction?)
Logging or recording (I'm guessing from Arduino to Pi, but if so, what data are being passed for logging? How often? Will anything be passed back such as acknowledgments or program adjustments based on data trends?)
Or is the Pi just there to reprogram the Arduino between tests, in which case why is it onboard the robot instead of connected by tether while reprogramming?

I might be on totally the wrong track here, but Scruss already asked what the Arduino and Pi will each be doing, and I haven't really seen an answer. All I've seen is that the Pi is controlling the movement of the balancing act. For that, I wouldn't imagine you'd need an Arduino at all. Alternatively, for just this task I'm pretty sure that you could forgo the Pi entirely and let the Arduino handle it all. This certainly seems like an interesting project, but I'd like to know how your pieces fit together.

Return to “Automation, sensing and robotics”