Processing to Arduino via serial port

Colleagues:

I am working with a student on a project and we have a glitch. Processing is sending information (supposedly a byte) to the serial port but Arduino is not reading it. Is there a line of code that I can use to find out exactly what is being sent to the Arduino? Processing is using the com port, so Arduino cannot print to the serial monitor while Processing is running. Neither my undergrad nor graduate student can seem to find a way to reveal exactly what Arduino is receiving (though it should be an integer), and I cannot find anything online. Suggestions?

Thanks in advance

One of the examples in serial input basics should be suitable.

Does your Processing code allow time for the Arduino to reset when it opens the serial port? See how that is managed in this Python demo.

It is a good idea to include code in your Processing program to show print statements from the Arduino.

...R

Thank you.

Do you have arduino code that works with the serial monitor? If the arduino code works with the serial monitor, then your problem is probably with the processing code.