Skip to content

Instantly share code, notes, and snippets.

@neerajnagi
Created November 17, 2016 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neerajnagi/1488f0013bc5014a95fd1496cdda8100 to your computer and use it in GitHub Desktop.
Save neerajnagi/1488f0013bc5014a95fd1496cdda8100 to your computer and use it in GitHub Desktop.
sensor status bit structure
{"t":1479255000,"c":0}
c is a number
convert it to binary
5bit are used
1st bit : unused , always 0
2nd bit : configured
3rd bit : discovered
4th bit : connected
5th bit : recieved
example: 16(decimal) == 10000(binary)
configured false
discovered false
connected false
recieved true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment