Ejemplo n.º 1
0
 //it will read as specified in the inspector
 public static byte [] readBuffer()
 {
     if (dataAvailable)
     {
         dataAvailable = false;
         string tempMessage = message;
         BtConnection.doneReading();
         return(getBytes(tempMessage));
     }
     else
     {
         return new byte[] {}
     };
 }
Ejemplo n.º 2
0
 //it will read as specified in the inspector
 public static string readLine()
 {
     if (BtConnection.mode() != 0)
     {
         BtConnection.listen(true);
     }
     if (dataAvailable)
     {
         dataAvailable = false;
         string tempMessage = message;
         BtConnection.doneReading();
         return(tempMessage);
     }
     else
     {
         return("");
     }
 }