diff --git a/Assets/Scripts/Arduino_Com.cs b/Assets/Scripts/Arduino_Com.cs index 16c941d..b931200 100644 --- a/Assets/Scripts/Arduino_Com.cs +++ b/Assets/Scripts/Arduino_Com.cs @@ -88,7 +88,7 @@ public class Arduino_Com : MonoBehaviour _readBytes += _serial.Read(_pageBuffer, _readBytes, PageSize - _readBytes); // Full page received, check checksum and ACK/NAK, write received page. - if (_readBytes >= 128) + if (_readBytes >= PageSize) { Byte[] checksum = new byte[2]; // There might be less than the two characters of the checksum available, loop until complete.