Go Down

Topic: Comprehensive ATtiny libraries overview? (Read 3195 times) previous topic - next topic

robitabu

Hi everybody,
I'm currently trying to figure out a way to use ATtinys (especially attiny85) with Arduino code possibly using already proved to be working Arduino libraries. Some are working, some are not, some have specifically modified corresponding versions which partially work with attiny, and sadly enough there are many libraries which were adapted to attinies but really don't work at all even if the authors claim they do.
Of course, sometimes it's just because of me that things don't work :-( I have to admit I'm not that good a coder at all.
Fact is, informations regarding ATtiny + Arduino Libraries is inconsistent and badly distributed on the net, so I'm lost.

Anyway, I'm wondering if there's someone out there confident enough to guide me through a working set of libraries that can be efficiently used in order to build a remote RF-Temperature-Light-Sensor. I already have a working sample that uses a standalone ATmega328, I whish to port this design to a smaller ATTiny85 based circuit.

Coding Badly


This may help...
http://brohogan.blogspot.com/

fungus

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

robitabu

#3
Oct 14, 2012, 09:15 am Last Edit: Oct 14, 2012, 04:17 pm by robitabu Reason: 1
Ok, since I'm going to use a DS18B20 for measuring temperatures and a 433MHz RF transmitter to send data to a base station, I'm going to need a OneWire library for the Temp and a VirtualWire/Manchester family library for the TX.
I've already tried VirtualWireTiny and a couple of Manchester Libs but without success :-(

I know porting an ATmega328 lib to work with an ATtiny85 is not always streamline, still it doesn't look to be extremely difficult either. I wonder if someone has already approached the task of such a port in a more consistent way. A few guidelines could be of much help for anybody wanting to try and do it by themselves.

This is the ATmega328 TX module prototype:

I'd like to make it work with an 8MHz internally clocked ATtiny85, hence reducing even more size and components. I'm positive it can be done :-)

sybarite

I'm working on a similar project, have you had success down-scaling your components?  I'm in the same boat, thinking the Atmega328p is overkill for this application.

fungus


I'd like to make it work with an 8MHz internally clocked ATtiny85, hence reducing even more size and components. I'm positive it can be done :-)


The real impediment is you're waiting for somebody else out there to do it for you. :)




No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Erni

Regarding the DS18B20 and OneWire, I have succesfully used the example code found here on a Attiny85

http://playground.arduino.cc/Learning/OneWire

robitabu


I'm working on a similar project, have you had success down-scaling your components?  I'm in the same boat, thinking the Atmega328p is overkill for this application.


No mate, I was distracted by my daily job, didn't have much time to spend on that. So I went on with a full flagged ATmega328.

But the idea is still in place. I really need to improve my programming skills though, before I can try and customize the libs like I want them to be. I still think recompiling OneWire and VirtualWire for ATTiny is doable, especially if I'm going to include strictly necessary code into them only. It's just that I'm still not the right person to do that, not yet at least.

Erni

#8
Jan 15, 2013, 05:07 pm Last Edit: Jan 15, 2013, 05:33 pm by Erni Reason: 1
I have just tried the new Manchester library mentioned here:

http://mchr3k-arduino.blogspot.dk/2012/02/wireless-sensor-node-part-6.html

It runs flawless on a Attiny85 as TX.

The transmitter is the same as  robitabu use

The receiver:
http://dx.com/p/315mhz-wireless-superregeneration-receiving-module-for-arduino-green-148957?rt=1&p=2&m=2&r=3&k=1&t=1&s=148983&u=148957


kowalski

How about this?

http://cosa-arduino.blogspot.se/2013/04/a-virtual-wire-digital-thermometer.html

Cheers!

sej7278

has anyone got i2c working on the attiny85 lately? TinyWireM doesn't seem to work anymore with IDE 1.0 or at least it doesn't work with any other libraries that expect the Wire library.

kowalski

There is another approach to ATtiny libraries. In Cosa all the libraries/classes compile for the full range of MCUs (Please see documentation for the full list of MCUs and boards). SPI, TWI, OWI etc are all implemented with the same interface from ATtiny. This allows code to seamlessly be developed on ATmegaXXXX and then retargeted to ATtiny.
https://github.com/mikaelpatel/Cosa

There are some obvious restrictions such as memory size, pins and hardware modules.

Cheers!

mrburnette

Also, look at Adafruit's Trinket and Digistump's Digispark which are both tiny85 based.  Lots of code and workaround is available.

Ray

Go Up