I’d like to connect two Arduinos over serial port so that they can communicate with each other. Initially, I put all necessary code onto one device and now connected another via serial port. As soon as I connected the second one I lost the ability to upload new code onto the first one. I’m certain they are conflicting over serial pins. I tried to hold reset on the second Arduino, but it didn’t help. The only way to flash it back again with avrdude is to disconnect the second one.
Is there a way to get this setup working with serial bootloader without disconnecting pins? Thanks for your ideas.
I do not use the Arduino IDE. I believe that if someone has a solution for Arduino it will work for me. I use Atmel Studio 7 with avr gcc. The boards are Chinese clones with ATMega328P on them flashed with the optiboot bootloader. Pins connected are TxD and RxD to opposites on the second board. They are powered from the same power supply. This question is not how to communicate with another Arduino. This question is how to still be able to flash one Arduino while something else is connected to its serial port. I know that the USB to serial bridge IC is connected, but this is a standard setup on all Arduinos that have no embedded USB controller.
Board is Arduino Nano v3 clone with CH340 USB<->UART chip. Both boards work OK by themselves, once connected together they stop responding to avrdude. The connection is as following. Length of connection is only 15cm.
Nano v3 (1) | Nano v3 (2) | | | RX0 o-----+------~ ~ ~------+-----o TX1 | | | | | TX1 o---+-|------~ ~ ~------|-+---o RX0 | | | | | | | --o-o-- | --o-o-- CH340 | CH340 ^ | ^ | | | USB | USB