Arduino libs on ATtiny13

I started fooling around with the ATtiny13 using Sam's incredible development module but found myself rapidly limited as a programmer. I wanted to use the useful functions millis(), delay(), etc. from the Arduino, which I find pretty convenient for advanced development.

So I simply got the files that I needed which can be found along with the arduino source code, in: hardware/cores/arduino/

You then have to include the right files:

#include "WProgram.h"

void setup() {
//...
}

void loop() {
//...
}

#include "main.cxx"

In order to get things working with the ATtiny13 I had to patch the wiring.c file. For the moment, I only patched it to support what is in wirinc.c, ie. the init(), delay() and millis() functions. I put the patch here in attachment.

AttachmentSize
wiring.c_attiny13.patch.txt1.88 KB

Reply

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.