Go Down

Topic: My path towards ATTiny and serial Comms (Read 869 times) previous topic - next topic


I'm working on a project that I would like to interface a ATTiny85 with XBee series2.  I've been successful with getting a bootloader on the ATTiny, I've also got the blinking LED sketch loaded and working without any problems.  The first obsticle (of many I'm sure) is that I get the error:

Code: [Select]
'Serial' was not declared in this scope

I've tried to do google searches, and it appears that I'm not using the right core.  The articles that I've read are not the most recent and I'm not sure what core to needs to be loaded.

This blog post is what I used as a guide to get me started:  http://www.txoof.com/2013/04/reading-serial-data-from-attiny85.html

Here is the simple sketch that I've tried to use without success:

Code: [Select]
void setup()  {

void loop()
Serial.println("Can it be true?! A serial monitor indeed!");

Any advice on how to choose a core would be great.  Thanks!

Tom Carpenter

You could try my core:

It has a built in software Serial library which can be used in the same way as the hardware library (e.g. Serial.begin() etc.) - PB0 is TX and PB1 is RX.



Ok so I admit I'm a total noob when it comes to cores.  Can I easily load multiple cores into the arduino IDE or am I up against a one at a time kind of thing?


The various types of cores should be added to your \sketches\hardware folder.  If you create separate folder names under the hardware folder then you could have multiple cores loaded.  However, note this caution, that the boards list may get very long.  The IDE will add entries to the Boards list by reading in the boards.txt file in each core directory under \hardware folder.

I usually will switch between them by just changing the filename for boards.txt in each core that I'm not using to something else.

\sketches\hardware\tiny\boards.txt    (this one active)
\sketches\hardware\attiny\boards.txt.unused   (this one not active)

Coding Badly

There isn't enough difference between the two to matter.


Nothing relevant to the t85 processor.

Go Up