need help. i want to display my sorting numbers in the app. connection is ok. code also shows no error. but not working.
my Arduino code
void updateCounts() {
if (arrayIndexToAimAt != 5) {
totalSorts++;
}
if (arrayIndexToAimAt == 0) {
redSorts++;
Serial.print("3");
} else if (arrayIndexToAimAt == 1) {
greenSorts++;
Serial.print("2");
} else if (arrayIndexToAimAt == 2) {
yellowSorts++;
Serial.print("4");
} else if (arrayIndexToAimAt == 3) {
blueSorts++;
Serial.print("0");
} else if (arrayIndexToAimAt == 4) {
brownSorts++;
Serial.print("1");
}
}
Blocks
N.B my Bluetooth connections blocks are defined in another screen.