Go Down

Topic: Library: Arduino + ATtiny compatible Manchester encoding/decoding (Read 6674 times) previous topic - next topic

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

This library was originally published on this thread: http://arduino.cc/forum/index.php?action=post;topic=63755.0;num_replies=16

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

I have now published it in the following location:

http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-code-management.html
https://github.com/mchr3k/arduino-libs-manchester

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: http://arduino.cc/en/Reference/Libraries

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

CrossRoads

Is this different/better somehow from the encoding that the VirtualWire library does for the same kind of transmitter/receivers?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Coding Badly

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


  ?


Quote
Would this be an appropriate library to add to the list on this page: http://arduino.cc/en/Reference/Libraries


Does the library work on an Uno?


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.


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


  ?


Quote
Would this be an appropriate library to add to the list on this page: http://arduino.cc/en/Reference/Libraries


Does the library work on an Uno?



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.

Code: [Select]
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.

Coding Badly

Quote
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.

Coding Badly

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


Sketch on the way.

Quote
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
https://github.com/arduino/Arduino/commit/80a2154279a02fd69f995ef6ff9eb889363c73ca

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 http://code.google.com/p/arduino-tiny/ 1.0 compatible ATtiny85 core.

Coding Badly


Excellent!  I'm glad you have it working.


Quote
Would this be an appropriate library to add to the list on this page: http://arduino.cc/en/Reference/Libraries


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.



Excellent!  I'm glad you have it working.

Quote
Would this be an appropriate library to add to the list on this page: http://arduino.cc/en/Reference/Libraries


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.

Coding Badly

Quote
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: http://mchr3k-arduino.blogspot.com/2012/02/wireless-sensor-node-part-6.html

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy