Hello Group!
I am having an issue that I believe is simple to fix however I cannot wrap my head around it. I have a
java program that connects to an arduino I can issue commands from the java program and the arduino responds accordingly. My issue is when the arduino starts up or resets I believe it is sending a white space or something to the serial port and my java picks that up and is disrupts the program. Arduino code and Java code posted below. I may have to send some sort of message from the arduino to clear the buffers and then start clean. I am not sure. Thanks in advance!
And below is the Java code that is for a button. When the button is pressed it sends a command to turn on an LED and it blinks....the Arduino is suppose to send data back in the form of "OX" when the Java code receives this code "OX" it prints to the console and states: LED BLINKING however it does not get the "OX" because there is something stuck in the buffers.