1

I wan't to send information from my arduino digital pins to another arduino's digital pins like a string, or a char. Can I do this without something like Software Serial?

The reason I am asking is because I am wanting to send information from several serial devices to my raspberry pi from an arduino. Thing is, that Raspberry pi only has one set of UART pins, so I was thinking because I have extra arduino uno's, why not send then information to the arduino and have it write the received information to the raspberry pi's digital pins..

Now that I am writing this, I think I will connect the 2 arduinos via a serial connection, and use software serial to write out to the raspberry pi, in three different stages, to get the information to the pi.

The reason I am using the PI is I want to display this information on a large screen with many different options, in short the GPU capabilities are what I am using the PI for, that and Processing.

Question still stands though, can you send information over digital pins?

2
  • If you have a RPi, why do you need Arduinos? May 7, 2016 at 0:36
  • @IgnacioVazquez-Abrams I need one arduino to remotely pilot a platform and receive readings from various sensors connected to it, that will transmit that data wirelessly to a raspberry pi, but it will also need several serial devices connected to it..hence my problem, multiple UART's and a good GPU.
    – Radmation
    May 7, 2016 at 0:58

3 Answers 3

1

Yes, you can send information to/from your arduino digital pins using a method called Bit Banging. Wikipedia (lots more on Google!)

You can use the Arduino to output as an ad hoc serial port or parallel port. The serial could be asynchronous (UART/RS232/I2C) or synchronous (such as SPI).

The down side is you will have to write a fair bit more software to send/interpret the data.

From your description I gather that data is only going one way - from the Arduino to the Pi. I personally would bit bang SPI as I think this would be the easiest and would not require exact timing.

2
  • Thanks for the answer. I will keep this in mind! I am just going to use the arduino for multiple serial connections using software serial..so I don't think I will need to "bit bang", but useful none the less. Thanks for answering the question!
    – Radmation
    May 7, 2016 at 3:12
  • @sa_leinad, Not sure why you are going this way if you want to aggregate all data onto the RaspberryPi. In order to use SPI or I2C you will have to make adjustments to the RaspberryPi Linux kernal. If you go RS232 you will have to start getty programs on the RaspberryPi for every serial port you manage to set up. The USB/FTDI solution may be the easiest to implement on the RaspberryPi. And there is already an FTDI chip on most Arduino Uno's.
    – st2000
    May 7, 2016 at 3:21
2

The RaspberryPi is a fairly complete linux computer. As such it can be a USB Host to many USB Devices. If you need more serial ports simply buy FTDI equipped USB to serial cables, plug them into a USB hub and plug that into the RaspberryPi. enter image description here

4
  • Thanks for the answer. If I didn't want to buy any additional parts, could I use an arduino to act as multiple serial connections for the PI?
    – Radmation
    May 7, 2016 at 1:00
  • Also can I take an existing USB cable and cut off an end to get this? Or does something else take place here?
    – Radmation
    May 7, 2016 at 1:01
  • Actually, yes. The (most) Arduino Uno contain an FTDI chip. That is how the Arduino talks to the host computer. I think what you will still need (unless you have a RasPi with lots of USB ports) is a USB hub to aggregate all the Uno's USB cables.
    – st2000
    May 7, 2016 at 1:02
  • Your 2nd question: The USB protocol is very complex. It is likely that you will never cut a USB cable to get to the data. Only to get to the 5 volts on the out side pins.
    – st2000
    May 7, 2016 at 1:04
2

There are many different ways of communicating.

In addition to serial you can use a protocol like SPI or I²C. If the Arduino are in close proximity I²C enables many devices to communicate on a common bus.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.