Show Posts
Pages: 1 [2]
16  Community / Exhibition / Gallery / Re: RF link display using the ATtiny85 on: February 05, 2012, 07:30:05 am

By default, the Tiny Core uses timer 1 for millis on the ATtiny85 processor.  You will either need to use timer 0 (which is much more "Arduino friendly") or move millis to timer 0.  There is an option in core_build_options.h to easily switch millis to timer 0.


Thanks for the tip! That could have caused some bizarre bugs if I tried to do some timing.

I have given up on using VirtualWire for now and have added interrupt driven message reception to the Manchester library which I am already using. Full details are available here: http://mchr3k-arduino.blogspot.com/2012/02/wireless-sensor-node-part-6.html
17  Development / Other Software Development / Re: Library: Arduino + ATtiny compatible Manchester encoding/decoding on: January 31, 2012, 07:17:13 pm

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.
18  Community / Exhibition / Gallery / Re: RF link display using the ATtiny85 on: January 31, 2012, 07:02:33 pm
I have been using your Manchester library for TX on an ATtiny85 and RX on an Arduino Uno. However, I am keen to get VirtualWire working as this uses an interrupt driven approach that avoids the sender/receiver having to block while sending/receiving.

I have made an attempt to get VirtualWire working for TX/RX on ATtiny85/Arduino Uno. The code is compiling and I am fairly sure I have used the correct timer settings but I don't seem to be receiving any valid messages on my Arduino.

I am programming my ATtiny85 using the instructions on this site (http://hlt.media.mit.edu/?p=1695) but with the ATtiny85 core from http://code.google.com/p/arduino-tiny/.

All of my code is up on github:

https://github.com/mchr3k/arduino/tree/master/libraries/VirtualWireNewTiny
https://github.com/mchr3k/arduino/blob/master/wsn_arduino_vw/wsn_arduino_vw.ino
https://github.com/mchr3k/arduino/blob/master/wsn_attiny_vw/wsn_attiny_vw.ino

As you can see, the TX is trying to send 10x"D" ("D" = 0x44). My receiver consistently receives strings like "0 10 0 C 1D C 1D A 28 0 C1 3 E 0 1 0 2 5D 0 C1 2 33 0 2 0 0 0 A 0". The first part of each received "message" is consistently "0 10 0 C 1D C 1D A 28 0 C1 3 E 0 1 0 2 5D 0 C1" for the first few minutes.

Can you suggest how I should debug this or what could be going wrong?

EDIT: A friend has pointed out that the ATtiny has 8 bit counters vs the ATmega 16 bit counters.

I’m trying to do 1000 bit/second which gives the following maths.

uint16_t ocr1a = (F_CPU / 8UL) / speed;
( 8000000 / 8 ) / 1000 = 1000

This value of 1000 won't fit in the ocr1a register so the timing will be totally wrong. I will need to adjust the clock frequency scaling to ensure the ocr1a value is lower on the ATtiny. I will hopefully try this out tonight.
19  Development / Other Software Development / Re: Library: Arduino + ATtiny compatible Manchester encoding/decoding on: January 31, 2012, 04:41:14 pm
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.
20  Development / Other Software Development / Re: Library: Arduino + ATtiny compatible Manchester encoding/decoding on: January 29, 2012, 06:46:30 pm
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.
21  Development / Other Software Development / Re: Library: Arduino + ATtiny compatible Manchester encoding/decoding on: January 29, 2012, 04:08:55 pm

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:
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.
22  Development / Other Software Development / Re: Library: Arduino + ATtiny compatible Manchester encoding/decoding on: January 28, 2012, 11:25:19 am
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.
23  Development / Other Software Development / Re: Library: Arduino + ATtiny compatible Manchester encoding/decoding on: January 28, 2012, 11:23:19 am
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.
24  Development / Other Software Development / Library: Arduino + ATtiny compatible Manchester encoding/decoding on: January 27, 2012, 12:33:29 pm
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. 
25  Community / Exhibition / Gallery / Re: Manchester encoding library for RF links. on: January 27, 2012, 12:11:35 pm
The latest version of this library is now available from the GitHub repo linked from my latest blog post: http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-code-management.html
26  Community / Exhibition / Gallery / Arduino + ATtiny85 wireless sensors on: January 23, 2012, 04:18:15 am
I have started a blog to keep track of my Arduino projects: http://mchr3k-arduino.blogspot.com/

The main project I am working on at the moment is a home wireless sensor network. These are the main posts regarding this topic so far:

http://mchr3k-arduino.blogspot.com/2012/01/home-wireless-sensor-network-making.html
http://mchr3k-arduino.blogspot.com/2012/01/home-wireless-sensor-network-battery.html
http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-part-1.html
http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-part-2.html
http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-part-3.html
http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-part-3-redux.html
http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-part-4.html
http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-code-management.html
http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-part-5.html
http://mchr3k-arduino.blogspot.com/2012/02/wireless-sensor-node-part-6.html

My initial simpler version of this project can be seen here:

http://mchr3k-arduino.blogspot.com/2012/01/history-part-2.html
http://mchr3k-arduino.blogspot.com/2012/01/history-part-2-redux.html
http://mchr3k-arduino.blogspot.com/2012/01/history-part-3.html
Pages: 1 [2]