Raspberry Pi Serial Port Uart Pastel

Posted on  by admin

Hi everyoneI have a problem with the serial ports on the Raspberry Pi4. I created a graphical interface on Processing that uses multiple serial ports simultaneously, sending commands to Arduino Mega.The serial ports I want to use are those on the GPIOs.

  1. Parallel Port
Ps/2 portRaspberry Pi Serial Port Uart Pastel

I read how to create an additional serial port by editing /boot/config.txt and I added the 'dtoverlay = uart2' line, in fact, Processing detects a new serial port / dev / ttyAMA1.From what I understand, this serial port communicates via GPIO 0 and GPIO 1, for this reason I connected these GPIOs to Arduino Pin 19 RX and 18TX, through a level converter and taking care to cross over the connections.I tried to change the GPIO setting but I didn't understand if what I did makes sense. I used the command sudo raspi-gpio set 0 a4 ​​in the terminal, but it didn't produce anything.Could you help me figure out how to configure a serial port so that it communicates from the respective GPIOs? I found out that uart2 is available but there is some restriction you need to knowNormally if you reboot the Pi and set the uart properly minicom should echo if you short the uart TX ad RX pin together!First Check the default serial using raspi-config. Disable login,enable seria, quit and rebootNow connect together GPIO14 & GPIO15. (pin 8 and 10).using minicom -D /dev/serial0 -b 9600.

Parallel Port

The software should echo what you type.This is the first step.After that enable uart 5, connect the RX ad TX pin and do the same with minicom. If you add dtoverlay=uar5 the device should be /dev/ttyAMA1.If you add another serial then the device will be /dev/ttyAMA2, etc.