I am trying to take serial input from a device and read it on the arduino, however, despite the signal very clearly reaching the pin, it does not recognize anything. The serial format is 2400-N-8-1 and I am using an arduino mega.
Also attached is a picture of an oscilloscope reading coming directly from the Serial2 Rx pin(17).
The program prints the “begin” and then does nothing. Other experiments show that the loop is running, it just for whatever reason is not processing the serial input.
Your loop clearly attempts to print what comes in on Serial1 over to Serial Monitor. You'll not see anything there if it's rate doesn't match Serial.begin(XXXX)
Not sure I follow. Assuming you meant serial 2 and not 1, my code should read it, output an int, which then gets printed to the monitor with serial. That serial and serial 2 have different baud rates is completely irrelevant.