Brookesa05
Posts: 22
Joined: Mon Apr 15, 2013 7:53 pm

Arduino to Raspberry Pi

Tue Feb 11, 2014 5:23 pm

Hi guys,
I need my raspberry pi to receive outputs from a RC Receiver. From doing some research i have worked out that my best option is to get my arduino to read the outputs from the receiver and the Arduino sends them to the pi. I have got the arduino receiving the inputs but i was wondering is there a way of sending these to the pi without using serial ie. using GPIO pins.

Thanks for any ideas,
Brookesa05

josar
Posts: 44
Joined: Sun Jan 19, 2014 1:29 am

Re: Arduino to Raspberry Pi

Tue Feb 11, 2014 11:56 pm

Consider using I2C bus as described here: http://blog.oscarliang.net/raspberry-pi ... ected-i2c/

Vasek42
Posts: 1
Joined: Wed Feb 12, 2014 8:42 pm

Re: Arduino to Raspberry Pi

Wed Feb 12, 2014 8:46 pm

What kind of RC Receiver? I have cheap 433 receiver and cheap nRF24l01 connected directly to Raspberry Pi with no Arduino help and it was not hard to connect (electronics newbie myself).

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

Re: Arduino to Raspberry Pi

Thu Feb 13, 2014 6:44 am

If you don't want to use the GPIO pins, your only other options are Ethernet or USB. If your Arduino supported Ethernet, you probably wouldn't be asking.

Some of the Arduinos, including the Leonardo, Micro, and Flora, can act as USB devices, and pretend to be something like a keyboard or mouse. If you have one that has this feature, you could just have the Arduino "type" the data to a terminal on the Pi. Have it log in at boot up (after waiting for the pi to boot,) run your data collection script, and just start entering data, which the script can then use every time your Arduino sends an enter character. You'll need to check out the tutorials on using it. There are plenty of examples out there even though it's a relatively new feature.

If neither of these work for you, you'll be using GPIO. Probably the I2C bus is a good solution, as josar mentioned, but that will require the use of pins on the GPIO header. I'm not sure of your reasoning for avoiding GPIO, but I'm assuming you're averse to using any pins on the header; not just the general purpose ones.

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

Re: Arduino to Raspberry Pi

Thu Feb 13, 2014 8:05 am

If you are trying to avoid serial communication just because of the GPIO pins and cabling, then use the USB cable to connect to Arduino UNO, Nano or Mega2560. Your RPi will see any of these as a standard serial port and you can exchange data easily.

However, if you are trying to avoid serial communication because the serial line of your Arduino is occupied by the RF receiver, then I2C communication is a good choice.

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

Re: Arduino to Raspberry Pi

Thu Feb 13, 2014 8:12 am

Vasek42 wrote:What kind of RC Receiver? I have cheap 433 receiver and cheap nRF24l01 connected directly to Raspberry Pi with no Arduino help and it was not hard to connect (electronics newbie myself).
I would like to know more about your solution. Is there any thread or blog with details?

Return to “Automation, sensing and robotics”