Exemplo n.º 1
0
 public string GetID()
 {
     Port.WriteByte(0x02);
     byte[] bytes = new byte[4];
     for (int i = 3; i >= 0; i--)      //little endian, so we have to reverse it
     {
         bytes[i] = (byte)Port.ReadByte(100);
     }
     return(Encoding.ASCII.GetString(bytes));
 }