So my PHP Serial communication code isn't working UNLESS the Arduino IDE's Serial Monitor is opened. Same goes for the terminal commands for serial.
I looked into it for a few days, the closest thing people had for an answer is that since the monitor is closed, the Arduino resets every time the serial communication is opened and doesn't have time and doesn't have time to read what was sent after rebooting. Although logically it should be able to do so if I put a delay between the Serial open and the serial write lines, but still nothing.
So I went for the Autoreset option, I got a 10uF capacitor and connected it between the GND and the reset pin (I am using Arduino Uno). Arduino did stop resetting every time I use the PHP code, but it still doesn't read/act based on what is sent (same code works when Serial Monitor is open).
I am loosing it and I have no idea what's wrong :D Help? :D