0
votes

I have an arduino uno connected to two stepper motors and an arduino mega. The mega needs to communicate with the arduino uno. When I run the program and open the Serial monitor, the serial monitor displays the output of the other program. I'm setting up the monitor on both sketches (the sketch for the uno and the mega) using Serial.begin(9600); If I run the code for the mega, the serial output of the uno will be displayed and vice versa. What can I do to fix this?

1
How the boards are wired together? TX->RX, RX->TX? Used Pin0 and Pin1? And what kind of output do you get?user3704293

1 Answers

0
votes

If you dont want to display any of the Arduino UNO output, you should connect the Arduino UNO to the Serail 2 of the Arduino MEGA.

"The Arduino Mega has three additional serial ports: Serial1 on pins 19 (RX) and 18 (TX), Serial2 on pins 17 (RX) and 16 (TX), Serial3 on pins 15 (RX) and 14 (TX)"

Make sure you will change into your script, otherwise you wont read the Arduino UNO output.