Can 2 arduinos communicate through computer via serial?

Hi everyone, Here is what i have running. One arduino Uno with Yun shield connected to it. A second arduino uno with potentiometer connected to it. I was wondering if the data of my pot be sent to the other arduino via serial.

For example, as i turn the pot on Arduino 2 (it sends out the value through serial) could the brightness of a LED connected to Arduino 1(reading the value from serial) change? Thanks, Wilder

I think you'll need some intermediate program running on the PC to read the incoming value on COMx and send it out on COMy. You could write something reasonably easily in say Python.

Is there a compelling reason to use the PC though? You could use a Wixel on each Arduino and cut out the middle-man. Wixel is wireless serial.

There was no particular reason why i was using a computer. I am building a wheelchair robot. The wheelchair is controlled by 2 motor shields on arduino 1 along with the Yun shield. The Yun shield connects arduino 1 to the computer via wifi. A second arduino has a pot (used as a joystick) connected to it. I am just trying to find easiest way for the remote to connect to the wheelchair via wifi. Thanks, Wilder

along with the Yun shield.

“the Yun shield”? What ARE you talking about? The Yun is NOT a shield.

wilderbuchanan: A second arduino has a pot (used as a joystick) connected to it. I am just trying to find easiest way for the remote to connect to the wheelchair via wifi.

This is very confusing. Do you mean a WiFi shield (rather than a Yun shield)? A Yun includes a Linux computer.

If the two Arduinos are attached to wheelchair why not just wire them together for communications.

If you want something else to communicate using WiFi then you have to tell us what the something else is, and what sort of communication you want.

If you had a real Yun you could easily run a webserver on the LInux side that could take commands from any device with a browser.

The most useful thing would be to describe WHAT you want to acheive rather than HOW you think it should be done.

...R

What i want to achieve is the following: A wheelchair run by 2 motor controller shields and a Yun shield (http://www.dragino.com/products/yunshield/item/86-yun-shield.html)(it has same basic functions as Arduino Yun) I want to be able to control the wheelchair via wifi from another device not on the wheelchair. Thanks, Wilder

wilderbuchanan: What i want to achieve is the following: A wheelchair run by 2 motor controller shields and a Yun shield (http://www.dragino.com/products/yunshield/item/86-yun-shield.html)(it has same basic functions as Arduino Yun) I want to be able to control the wheelchair via wifi from another device not on the wheelchair.

Most of that is HOW rather than WHAT in the sense that you have decided on HOW the system should work.

Also, there is a great deal of omitted detail. And I can't see the connection between that description as your Thread title - where does the "computer" come into the picture?

Are you planning to use an Uno with 2 motor shields and a Dragino shield attached to it? Do you know if that will work?

The Dragino shield purports to give the same functionality as a Yun. If so I would write the interface as a webserver in Python on the Linux side. Then you could control it from any WiFi device with a browser - such as a smart phone. The Python code could control the whole system in exactly the same way that code on a PC could control an Uno attached using the USB cable.

...R

I have gotten the motor shield and Dragino to work together. Using the webserver as the interface seems like the direction I want to go! The computer was just what I thought would have been the easiest way to do it, I guess not. Thank you so much for your help, Wilder

wilderbuchanan: Using the webserver as the interface seems like the direction I want to go!

This EzScrn demo (which works on a Yun) may give you some ideas although it is probably not exactly what you want.

...R