Is there a way to use only 2 pins between the raspberry pi and arduino for communications? or would it be a wiser idea to simply install arduino ide and serial communicate between python and the arduino ide? Specifically, I want to use python. it would act as master, and arduino as slave unit. that way, the arduino would handle raw data, and raspberry pi would interpret it and send commands and interface accordingly. namely, i will be using a tamiya track set, an ultrasonic distance sensor on servo, and perhaps a robotic arm, if i feel adventurous.
Is there a way to use only 2 pins between the raspberry pi and arduino for communications?
On the Arduino side, yes. You can use any two pins and SoftwareSerial.
On the raspberry side? Ask your Ford questions on the Ford forum. This here is the Chevy forum where you can ask Chevy questions.
Specifically, I want to use python.
On the raspberry? You can't use it on the Arduino.
the arduino would handle raw data, and raspberry pi would interpret it
What does "handle the raw data" mean? Data from what?
What does "interpret it" mean? How are you going to get the raw data, whatever that means, from one to the other? Is that what the serial port questions are about?
and send commands and interface accordingly.
Send commands where? What the hell does "interface accordingly" mean. Useless vague terms like that will get you exactly nowhere.
namely, i will be using a tamiya track set, an ultrasonic distance sensor on servo, and perhaps a robotic arm, if i feel adventurous.
And what will the raspberry be doing? Acting as a counterweight?
As for the chevy vs ford forum, I would get a similar reply heh heh.
Anyway, to be more specific;
The arduino would act as the input and output; the raspberry pi would act as a regular computer may when connected to the arduino. It would receive data from the arduino's sensors, and would handle them independently in python, and make decisions based on the output from the data. this may seem redundant, considering the arduino is perfectly capable of doing this on its own. However, using the raspberry pi would enable a few more options, including programming independent from a separate computer, as well as the ability to use the GUI from linux to have visual feedback and summary of the raw data from the arduino, approximately real-time. from there, commands would be sent back to the arduino to be performed. to simplify, I would say the arduino would be "low level" programs, and the raspberry pi would be "high functions".
Im sure some of you would be familiar with the HERO robot from the 80's. My inspiration was drawn largely from the ability of the HERO's user to program on the robot itself without external interface. I want to bring that to the linux environment, as well as the arduino world. The raspberry pi on its own cannot handle the number of inputs and outputs I require, and using the general purpose input/output in linux alone would involve a great deal of technical command prompt use; likewise, the arduino would be , in a practical sense, incapable of having a graphical user interface and on board programming abiltiy, as well as limiting the use of wireless internet capabilities.
Combining the two on a modular platform gives me the best of both worlds, and will result in a comfortably complete all in one package.
The problems that I must solve now are;
my lack of experience with arduino
my limited ability to program in either C++(arduino) and rather amateur abilities with python (raspberry pi)
the logistics of maximizing the arduino/pi communications while limiting the number of pins in use
to tackle the latter problem, I am curious if there is a way to formulate a bit communication system using only a input and output respectively between the two devices with only two wires, or should i concentrate my efforts on making sure the pi can run the ide, and communicate via usb serial.
any additional ideas, support, tips etc are greatly appreciated
cottewmi:
the arduino would be , in a practical sense, incapable of having a graphical user interface and on board programming abiltiy, as well as limiting the use of wireless internet capabilities.
I'm not so sure about that. You would need to define what you want. A Mega2560 has a reasonable amount of RAM, program memory, quite a few interface pins etc. You could connect a LCD using I2C (using only 2 wires plus power and ground).
And what will the raspberry be doing? Acting as a counterweight?
And doing a fantastic job, no doubt.