I'm new to Arduino and what I'm trying to do is send a float as a string from php to the Arduino. I'm using Arduino UNO.
It will parse the float from the string and compare it. If it matches, pin 13 will flash. So far, I've done all I can such as add a delay after opening the port in php but it doesn't seem to work.
Does the PHP fwrite() function terminate what it sends with the newline character that readStringUntil() is looking for ?
Arduino floats have more than 2 decimal places but a comparison using == will test for an exact match. Try printing val with more than 2 decimal places before you test its value. What do you see ?
Also note that in the case of most Arduinos opening the Serial port causes a reset
how do I send new data to the Arduino without causing it to reset?
Leave the port open between writes
Which Arduino board are you using ? If you are using an AVR based Arduino then you cannot sensibly use pins 0 and 1 for serial communications if that is what you are doing
Please describe, or better still post a schematic, of how your Arduino is connected to whatever is running the PHP code.
62.1 is certainly larger than 60 but if you are putting the value received into a String then you could compare "60.1" with "60.1" directly