It is working exactly the way it should. Rx is receiver, think of your TV You can watch it but it does not send your picture anywhere because it is a receiver. Not think of a wireless microphone you can talk into it and it will be received on one of the appropriately tuned receiver but it will not speak at you. You need Tx -> Rx and Rx -> Tx. Be sure both are at the same baud! Happy computing. You might spend a little time researching RS232 signals.
Let me explain to you (with the help of Fig-1) what happens when you execute the following code:
char y = Serial.read();
1. When we enter ABC in the InputBox of the Serial Monitor, the ASCII codes pf these characters (0x41, 0x42, 0x43) arrive to UNO (one-after-another) via RXD-pin and are saved into the Serial Buffer on interrupt Basis.
2. The execution of char y = Serial.read() command brings out 0x41 from TOP position (Location-0) of the Buffer into variable y. The data byte x41 takes the position of Location-0 and 0x42 takes the position of Location-1. The Serial Buffer is a first-in first-out (FIFO) type buffer.
3. Concepts similar to the above may also be applied to understand the functioning of Serial.write(arg) command.
Must say I'm confused about the connections too. Are they both on usbs in different instances of the monitor on different com ports or what. Perhaps @studiogamma could drop a diagram in here to clarify.
But anyway, I would think that if you want serial comms between 2 Arduinos then software serial would be the thing to use, and leave the hardware serial on the usb intact for program loading and the monitor, with no chance of this confusion.
That's irrelevant on an Uno where Serial is always true.
Uno 2 is connected to the computer via USB ( so it uses the serial monitor ) . It’s connected to Uno 1 via RX to RX and TX to TX and Gnd to gnd. Uno 1 is not connected to a computer. The shown code is on the Uno 1.
It does display ‘Starting…’ , which goes from the 1 to the 2 and displays on the 2’s serial monitor. It just seems to hang up on Serial.available() on Uno 1when I try to send data back (serial monitor to Usb2 to Usb1)