SoftwareSerial/AltSoftSerial using different ports

I'm trying to change the transmit port using either SoftwareSerial or AltSoftSerial, but am not having any luck at all. SoftwareSerial works when I transmit out pin 1 - I can see the TX LED blink, the values printed in Serial Monitor, and am also able receive the data on the other end (an Arduino Mega). When I try a different port, however, I get nothing - no blink, no print, no transmission. Same thing if I try using AltSoftSerial.

#include <SoftwareSerial.h>
#include <AltSoftSerial.h>

//SoftwareSerial mySerial(0, 1); // RX, TX
//SoftwareSerial mySerial(10, 11); // RX, TX
AltSoftSerial mySerial; //RX pin 8, TX pin 9


void setup() {
  mySerial.begin(9600);
  mySerial.println("Hello World");
}


void loop() {
  byte x = 3;
  delay(500);
  mySerial.println(x);
}

I'll be using the RX port on the Uno to receive MIDI data, which seems to overtake the TX port as well when instantiated, so I need to reassign the SoftwareSerial port to something else besides that. It seems like it should be such a simple thing, and I can't figure out what the deal is... I should at least see a blinking LED, right?

Why would you use software serial on a MEGA which has 4 hardware serial ports?

MorganS:
Why would you use software serial on a MEGA which has 4 hardware serial ports?

I'm using the Mega to receive on hardware, and software on the Uno to send. Unfortunately I need the Mega to run a larger set of code than the Uno can handle, else I'd swap them around.

So it's your lucky day. The MEGA has 3 spare serial ports you're not using yet.

Buy another one if you have to. It's always helpful if the two ends of the link have the same chip.

I probably will. But I'd still like to understand why the port change is not working. Or, for that matter, why I seem to have the same problem changing hardware serial ports. I have the same issue on the Mega when trying any of the other ports:

void setup() {
  Serial1.begin(9600);
}

void loop() {
  byte x = 3;
  delay(500);
  Serial1.println(x);
}

No TX LED blink, or serial monitor output. Do I need to tell the serial monitor to pay attention to Serial1 instead of Serial or something?

SoftwareSerial (and family) does not blink the leds. Neither do any of the other hardware serial ports; only serial blinks the leds (or software serial on pin 1).

And don't use pins 0 and 1 for it, they are connected to HardwareSerial on most Arduinos.

sterretje:
SoftwareSerial (and family) does not blink the leds. Neither do any of the other hardware serial ports; only serial blinks the leds (or software serial on pin 1).

Ahh, gotcha - I was wondering if that were the case. Is it possible to still use print to Serial Monitor on either SoftwareSerial or the other hardware ports?

You need additional hardware, usually referred to as FTDI cable. It basically provides the same functionality (5V or 3.3V serial to usb) as the 16U2 chip on your uno or mega.

sterretje:
You need additional hardware, usually referred to as FTDI cable. It basically provides the same functionality (5V or 3.3V serial to usb) as the 16U2 chip on your uno or mega.

Understood. Thanks!