how to read serial data sent from the PC to the arduino with another arduino

hello,

like many i am also new to Arduino and c programming.

I am working on AxiDraw clone i.e., 4xiDraw using Arduino Uno. which works on G-code using UGS, universal g- code sender. what i need is to read the serial data, which is sent by the UGS(computer) to the arduino with another arduino.

i was able to read data by 4xiDraw arduino which is sent to the computer.while the connections are TX of 4xiDraw arduino to RX of other arduino.

i hope you understand my question.
thanks in advance.

sahan

I think a diagram of the connections would help to clarify what you are trying to describe.

If a PC is sending data to an Arduino using a USB cable then you could connect that Arduino's Rx pin to the Rx pin on a second Arduino (plus a GND connection) and the second Arduino would receive the same data as the first Arduino.

...R

If you basically just want to sniff the Serial communication between the arduino (Arduino A) and the PC, I think this should do it:

  1. Using second arduino (Arduino B), wire the Tx line of A to the Rx of B.
  2. Connect B to a PC.
  3. Open IDE (a new instance if already running), select B COM port and open Serial monitor and Voila! you should be able to see the Serial Comms of whatever A is transmitting to the PC.

If you want to see the Serial Comms of PC to A, then you should connect Rx line of A to the Rx of B (or use a 3rd arduino or Serial2USB converter).

sherzaad:
If you basically just want to sniff the Serial communication between the arduino (Arduino A) and the PC, I think this should do it:

My Reply #1 assumed that the OP wanted to detect what the PC is sending to Arduino A.

I have no idea which of us is correct.

...R