Go Down

Topic: (SORTED) Arduino 1.0 'BREAKS' ATTINY Support!!! (Read 3768 times) previous topic - next topic

spycatcher2k

Dec 08, 2011, 08:32 pm Last Edit: Dec 09, 2011, 01:10 pm by spycatcher2k Reason: 1
Arduino 1 IDE will not let me program my 45/85 attinys :

Quote

kitt.cpp:7:21: error: Arduino.h: No such file or directory
kitt.cpp: In function 'void setup()':
kitt.pde:-1: error: 'OUTPUT' was not declared in this scope
kitt.pde:-1: error: 'pinMode' was not declared in this scope
kitt.cpp: In function 'void loop()':
kitt.pde:-1: error: 'HIGH' was not declared in this scope
kitt.pde:-1: error: 'digitalWrite' was not declared in this scope
kitt.pde:-1: error: 'delay' was not declared in this scope
kitt.pde:-1: error: 'LOW' was not declared in this scope

All down to Arduino.h I suspect

Any ideas anyone??
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

spycatcher2k

Found this :

The Arduino IDE replaces WProgram.h with Arduino.h, breaking everything.

There's an easy fix: add a file "Arduino.h" inside cores/tiny/ with one line in it:

    #include <WProgram.h>

Easy fix. There may be more incompatibilities, but this got my basic sketch compiling again.

That got it working.

Thanks again the coding badly for his brilliant core :)
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

mellis

I also made a new version of the ATtiny45/85 support (and added ATtiny44/84 support) for Arduino 1.0: http://hlt.media.mit.edu/?p=1695

It uses the fact that the standard Arduino core is now more-or-less processor independent, so you only need to provide a single header file to add support for a new processor.  The SoftwareSerial library (NewSoftSerial) works too.

Comments and improvements welcome: https://github.com/damellis/attiny

Go Up