From: realraum Date: Tue, 13 Dec 2011 00:16:55 +0000 (+0000) Subject: changed time base to 8kHz X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=6d4aed4ddaebe362116785c965744a16eebaf796;p=svn42.git changed time base to 8kHz added binary output to decoder --- diff --git a/rf433rcv/pc/decode.pl b/rf433rcv/pc/decode.pl index c5822e5..fc7f92e 100755 --- a/rf433rcv/pc/decode.pl +++ b/rf433rcv/pc/decode.pl @@ -52,5 +52,17 @@ if (my $delemiter = $ARGV[0]) } } 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; } + diff --git a/rf433rcv/teensy/example.c b/rf433rcv/teensy/example.c index ab7026c..ad07cda 100644 --- a/rf433rcv/teensy/example.c +++ b/rf433rcv/teensy/example.c @@ -45,7 +45,7 @@ int main(void) // 200*8 clock cycles, 100us TCCR0A = 1<