Skip to content

Instantly share code, notes, and snippets.

@vlofgren
Created November 5, 2013 17:19
Show Gist options
  • Select an option

  • Save vlofgren/7322630 to your computer and use it in GitHub Desktop.

Select an option

Save vlofgren/7322630 to your computer and use it in GitHub Desktop.
if(sum < threshold) {
if(signal_length) {
if(signal_length > 10) {
if(bit != 0) printf("(?)");
bit = 0;
signal_length = 0;
} else {
bit_data = 2 * bit_data + (signal_length < 6);
if(++bit == 8) {
printf("%c", bit_data);
fflush(NULL);
bit = 0;
}
}
signal_length = 0;
}
} else {
signal_length++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment