Can I use my Arduino Uno as a USB to serial converter to program my Raspberry pi 0 over serial communication?
My idea: Computer connects to Arduino via USB> Arduino connects with Raspberry pi 0 via GPIO pins.
How do I go about this?
-
1Have you heard about SSH?tttapa– tttapa2018年01月21日 10:32:44 +00:00Commented Jan 21, 2018 at 10:32
-
You probably can - but what are you trying to achieve? What's wrong with the normal methods which makes you want to do it this way?Mark Smith– Mark Smith2018年01月21日 12:59:06 +00:00Commented Jan 21, 2018 at 12:59
-
I have the Raspberry pi 0 without WiFi, so SSH is no option for me. I would like to communicate with it over serial line. Since I have an Arduino anyway, I thought that might work to program the pi.Jennes De Schutter– Jennes De Schutter2018年01月22日 11:07:11 +00:00Commented Jan 22, 2018 at 11:07
3 Answers 3
You may also put Arduino in a reset state then Rx & Tx lines of serial converter will be free.
If you load an empty program in your arduino, and make the folowing connections:
Pi --> Arduino
Pin 8 --> Pin 1
Pin 10 --> Pin 0
Gnd --> Gnd
than you should see your linux console in the arduino serial program is you set the baudrate to 115200.
This method will work for the raspberry pi models without wifi. On the wifi models the pins on the pi will be different.
The Arduino uses FTDI usb-to serial converter. This converters uart side is connected to the AVR-chip via pin 0 and 1. If you load an empty program in your arduino, it wil not use these lines. Now you can connect directly to the FTDI chip thru this pins. The converter does not care if it is communicating with the arduino or the pi over these lines.
-
The Arduino uses FTDI usb-to serial converter. This converters uart side is connected to the AVR-chip via pin 0 and 1. If you load an empty program in your arduino, it wil not use these lines. Now you can connect directly to the FTDI chip thru this pins. The converter does not care if it is communicating with the arduino or the pi over these lines.4ilo– 4ilo2018年01月21日 14:05:21 +00:00Commented Jan 21, 2018 at 14:05
-
The Arduino uses FTDI usb-to serial converter.
... that is not true for UNOjsotola– jsotola2018年01月23日 03:16:18 +00:00Commented Jan 23, 2018 at 3:16 -
They changed the FTDI with a compatible Atmel part between revisions, but the concept stays the same as with the FTDI.4ilo– 4ilo2018年01月23日 07:54:04 +00:00Commented Jan 23, 2018 at 7:54
In the arduino ide, go to file > examples > arduino as isp. Might be a good starting point.
Seems like a lot of work though. If I were in that situation then I'd either use an ethernet cable and SSH, or, use a mobile phone as a WiFi hot-spot.