-->
Page 1 of 2

Manchester decoding library for 433Mhz receiver

PostPosted: Mon Oct 03, 2016 4:35 pm
by zentron
Hi all!
I've been looking for a way to receive a message sent by another device (ATTiny) over 433Mhz using Manchester encoding. The only libraries I can find that seem to be able to be used on the ESP8266 is the RC-Switch library however the data I am sending is a little longer and this library seems less suitable then being able to use the Manchester encoding ones. On the transmission side I have been using the library found here http://mchr3k.github.io/arduino-libs-manchester/ , however in the code it specifically states that its only for ATmega or ATtiny. Being new to this space I'm not entirely sure why it shouldn't work on the ESP8266. Is there something different about the clock? the pins? Any help with getting a manchester encoded message decoded on the ESP8266 would be much appreciated.

Re: Manchester decoding library for 433Mhz receiver

PostPosted: Mon Oct 03, 2016 4:59 pm
by RichardS
So they fudged the timing in the cpp code for various AVR processors, they did this due to the overhead of calls to functions like millis() or micros(), but in the ESP8266 world this overhead is going to be much smaller, so some tweaking to the code would be needed for ESP8266. Basically millis() and micros() ain't going to slow ya down :D

It a fairly easy fix for someone with a few hours on their hands.

RichardS

Re: Manchester decoding library for 433Mhz receiver

PostPosted: Mon Oct 03, 2016 6:20 pm
by zentron
Thanks for replying so quick Richard!
Just to confirm, you are referring to where the TCCR2A& TCCR2B etc values are set to something based on the detected CPU frequency? I notice that all these variables are not available when coding against ESP8266. Does some other variable need to be set to get the same effect in the ESP8266? I have found another library at https://github.com/mchr3k/arduino-libs-manchester however it again seems to have issues with those timer variables as you pointed out.
Thanks again for your comments, I appreciate the feedback on what might look like a fairly simple problem to someone who just "gets" all this.


RichardS wrote:So they fudged the timing in the cpp code for various AVR processors, they did this due to the overhead of calls to functions like millis() or micros(), but in the ESP8266 world this overhead is going to be much smaller, so some tweaking to the code would be needed for ESP8266. Basically millis() and micros() ain't going to slow ya down :D

It a fairly easy fix for someone with a few hours on their hands.

RichardS

Re: Manchester decoding library for 433Mhz receiver

PostPosted: Mon Oct 03, 2016 6:28 pm
by RichardS
TCCR2A& TCCR2B are AVR registers, nothing to do with ESP8266.....

RichardS