public static byte [] readBuffer(int length, byte stopByte) { if (BtConnection.mode() != 2) { BtConnection.listen(true, length, stopByte); } return(BtConnection.readBuffer(length, stopByte)); }
//plugin methods void startReading(string s) { byteMessage = BtConnection.readBuffer(); dataAvailable = true; }