Посмотрите эту тему
Выложите ту часть проекта флпрог, в которой формируется строчная переменная для разбора.
С Nextion не подскажу, не было такого, не вникал в его работу.
По Вашей ссылке на сайте проекта уже присутствует
Код: Выделить всё
// All this data comes as one long String at the Arduino.
//So here, first we need to extract the data from that string and put it into separate variables.
if (Serial.available()) {
content = Serial.readString(); // Read the incomding data from Processing
// Extract the data from the string and put into separate integer variables (data[] array)
for (int i = 0; i < 10; i++) {
// It's a changed line!!!
int index = content.indexOf("/"); // locate the first "/"
// int index = content.indexOf(","); // locate the first ","
data[i] = atol(content.substring(0, index).c_str()); //Extract the number from start to the "/"
content = content.substring(index + 1); //Remove the number from the string
}
/*
data[0] - SAVE button status
data[1] - RUN button status
data[2] - Joint 1 angle
data[3] - Joint 2 angle
data[4] - Joint 3 angle
data[5] - Z position
data[6] - Gripper value
data[7] - Speed value
data[8] - Acceleration value
*/