added binary output to decoder
}
}
chop $seq;
- print STDERR "$seq\n";
+ # print "$seq\n";
+ my $bitcount=0;
+ my @binarydata;
+ for my $bits (split /,/,$seq)
+ {
+ $binarydata[int($bitcount/8)]<<=1;
+ $binarydata[int($bitcount/8)]|=$bits;
+ $bitcount++;
+ }
+ $binarydata[int($bitcount/8)]<<= 7 - ($bitcount % 8);
+ my @chars = map { chr($_) } @binarydata;
+ print STDERR join '',@chars;
}
+
// 200*8 clock cycles, 100us
TCCR0A = 1<<WGM01;
TCCR0B = 1<<CS01;
- OCR0A = 199;
+ OCR0A = 249;
TCNT0 = 0;
TIMSK0 = (1<<OCIE0A);