hi, this my ph kit. i use arduino UNO. this ph kit use communication UART send character 'P' then get data of ph sensor. This is code of ph kit, but it does not work. Please fix code help me
You have WAY too much code for someone who thinks that the pH sensor is not working.
ALL that the sketch is doing should be to send a 'P' and wait (you are NOT waiting) for a response.
You need to post a schematic showing how the device is connected. For all we know, you simply rubber-banded it to the Arduino.
You should NOT be connecting it to the only hardware serial port you have. That one should be being used to debug the code. You should have it connected to two other pins and be using SoftwareSerial to talk to the device.