Skip to content

Instantly share code, notes, and snippets.

@matthijskooijman
Last active August 29, 2015 14:26
Show Gist options
  • Save matthijskooijman/5fb14a25c0345dcca249 to your computer and use it in GitHub Desktop.
Save matthijskooijman/5fb14a25c0345dcca249 to your computer and use it in GitHub Desktop.
void dump(decode_results *results) {
int count = results->rawlen;
for (int i = 0; i * 2 + 4 < count; i++) {
int ibyte = i / 8;
int ibit = 7 - i % 8;
Serial.print(results->rawbuf[(ibyte * 8 + ibit)*2 + 4]*USECPERTICK > 600 ? "1" : "0");
if (i % 8 == 7)
Serial.print(" ");
}
Serial.println();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment