Skip to content

Instantly share code, notes, and snippets.

@oilking143
Created April 17, 2016 05:48
Show Gist options
  • Save oilking143/a6c9fe6e4c6f2501175e3e56ba864e4f to your computer and use it in GitHub Desktop.
Save oilking143/a6c9fe6e4c6f2501175e3e56ba864e4f to your computer and use it in GitHub Desktop.
byte[] cmdbuf = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int SendCRC;
cmdbuf[0] = (byte)0xFF;
cmdbuf[1] = (byte)0xB1;
cmdbuf[2] = (byte)0x00;
cmdbuf[3] = (byte)0x00;
SendCRC = Calculate_CRC16(cmdbuf, 4); cmdbuf[4] = (byte)(SendCRC>>8);
cmdbuf[5] = (byte)(SendCRC&0xFF); commandChar.setValue(cmdbuf);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment