Library: Arduino + ATtiny compatible Manchester encoding/decoding

I have just published a Manchester encoding/decoding library which is compatible with Arduino and ATtiny.

This library was originally published on this thread: Arduino Forum

A friend and I have since been working with it and improving it.

I have now published it in the following location:

This library is ideal for use with the cheap 315Mhz/434Mhz RF transmitters and receivers which are available.

Would this be an appropriate library to add to the list on this page: Libraries - Arduino Reference

I am currently using the library with Arduino IDE 0022. I found there were issues with 1.0 support for the ATtiny.

Is this different/better somehow from the encoding that the VirtualWire library does for the same kind of transmitter/receivers?

I found there were issues with 1.0 support for the ATtiny.

?

Would this be an appropriate library to add to the list on this page: Libraries - Arduino Reference

Does the library work on an Uno?

CrossRoads:
Is this different/better somehow from the encoding that the VirtualWire library does for the same kind of transmitter/receivers?

The main difference is that this library works on an ATtiny85 (as well as an Arduino Uno) which is a nice cheap MCU to use for low power wireless nodes.

I haven't actually looked in detail at the code for the VirtualWire library so I can't say whether the encoding is any better/worse.

The library works on an Uno and on an ATtiny85. However I haven't managed to get it to compile using the IDE 1.0 ATtiny85 support.

Which core are you using?

I'm using the Core linked from this page: http://hlt.media.mit.edu/?p=1695

I managed to resolve the compile errors on my project with IDE 1.0. However, the programming failed with the following errors.

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): protocol error

Looks like I'll be sticking with Arduino 0022 for now.

protocol error, expect=0x14, resp=0x64

...is a problem with the ArduinoISP sketch compiled with 1.0. You can lower the baud rate to 9600, increase the receive buffer size, or I have an update that works correctly with 1.0. If you'd like a copy, send me a Personal Message with your email address.

Thanks for the offer - I've sent you a PM. Is there a bug tracking this so it will be fixed in Arduino IDE 1.1?

I've taken a look at the VirtualWire library and it looks like it is a more advanced interrupt based solution. However, as per this thread apparently VirtualWire can be sensitive to the clock frequency changing with temperature.

I am investigating getting VirtualWire working properly on ATtiny so that I can do a fair comparison.

mchr3k:
Thanks for the offer - I've sent you a PM.

Sketch on the way.

Is there a bug tracking this so it will be fixed in Arduino IDE 1.1?

http://code.google.com/p/arduino/issues/detail?id=661

I've tried using your updated Arduino ISP sketch and I can now program my ATtiny85 using Arduino IDE 1.0 without any errors.

I had to switch to use the Google Code Archive - Long-term storage for Google Code Project Hosting. 1.0 compatible ATtiny85 core.

Excellent! I'm glad you have it working.

Would this be an appropriate library to add to the list on this page: Libraries - Arduino Reference

Probably. I suspect there are two obstacles...

  1. "Full" Arduino support. I believe all those libraries have been shown to work on most or all Arduino boards. At a minimum, your library should be tested on one or both Mega boards.

  2. Attention. The Arduino folks have fallen a bit behind in the documentation. Even if they agree to add your library, I suspect it would be months before it happened. Were I in your shoes I would continue the path you've started: publishing and documenting from a site you control.

Thanks for the warning. Is there any official process to have the library added to a list for future consideration?

I don't really mind if/when it ever gets linked from the Libraries page. It just seemed like it might be a useful library for other users.

Is there any official process to have the library added to a list for future consideration?

I am not aware of one. I'll try to find out...

I have now added interrupt driven message reception to the Manchester library. Full details are available here: Mchr3k - Arduino: Wireless sensor node - background rx (6)

Hello every one,

I have tried to install the library, but when i compile the exemple code, I have this error message:

C:\Project\Arduino\libraries\Manchester\Manchester.cpp: In function 'void MANRX_SetupReceive(uint8_t)':
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:366: error: 'TCCR2A' was not declared in this scope
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:366: error: 'WGM21' was not declared in this scope
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:371: error: 'TCCR2B' was not declared in this scope
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:371: error: 'CS21' was not declared in this scope
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:371: error: 'CS20' was not declared in this scope
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:372: error: 'OCR2A' was not declared in this scope
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:379: error: 'TIMSK2' was not declared in this scope
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:379: error: 'OCIE2A' was not declared in this scope
C:\Project\Arduino\libraries\Manchester\Manchester.cpp:380: error: 'TCNT2' was not declared in this scope

I searched in the internet and I think the problem come from the core of attiny85? Please show me how to fix it.

Many thanks