0

I am building a project that uses an Arduino for controlling addressable LEDs and a Pi for sending data over usb. What I am trying to figure out is whether there is a way to have the Arduino signal back to the Pi when it is ready for more data. I can't use the usb because serial tx is disabled. This is because pin 1 on the Arduino is in use and I can't easily move it to another pin. Ideally I would like to be able to just use something like pin 10 on the Arduino and one of the GPIO pins on the Pi. The Arduino would do DigitalWrites as needed and the Pi do gpio reads to get the state.

My knowledge gap is with the physical connection. From many searches it seems that I cannot just connect a wire. There seems to be a need for some circuitry in between but I am at a loss. Any suggestions are greatly appreciated.

1
  • "There seems to be a need for some circuitry in between" Yes, a level shifter: raspberrypi.stackexchange.com/questions/49772/… <- That's with reference to arduino devices but the same thing applies WRT any pin-to-pin connection with an actual arduino.
    – goldilocks
    Oct 12, 2021 at 19:45

1 Answer 1

1

Generally Arduino GPIO are 5V and the Pi's GPIO are 3V3. If you directly connect 5V to a Pi GPIO you will eventually destroy the Pi GPIO and then the Pi.

If you have a 3V3 Arduino you can directly connect the GPIO. I would advise a 10k resistor in series. You also need to connect a Pi ground to an Arduino ground.

If you have a 5V Arduino you will need a voltage level shifter. You can create a simple one from a resistor divider. You also need to connect a Pi ground to an Arduino ground.

Your Answer

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

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