Open Betty1909 opened 1 month ago
Hi ! As indicated the command string does not have any default terminator : https://github.com/SHWotever/SimHub/wiki/Custom-serial-devices#protocol-definition
Your code is likely to get stuck indefinitely on the second readstringuntil
Arduino Leonardo not read serial from simhub by using custom serial devices.
Simhub version 9.3.4
Arduino sketch
int gear = Serial.readStringUntil(';').toInt(); int hdl = Serial.readStringUntil('\n').toInt();
Simhub NCalc format([Gear], 'P') + ';' +isnull([GameRawData.light_LowBeam], 0)
It work only use Serial.read(); Arduino will report serial to simhub.
When change to Serial.readStringUntil(';').toInt(); Nothing send back to simhub.
Sorry for my bad english.