Go Down

Topic: How to get Arduino type? (Read 756 times) previous topic - next topic


Hello everybody.

I'm working on a new project nowadays. I'm trying to get Arduino type and write it on LCD. For example;

"You'r using Arduino UNO" or "You'r using Arduino PRO" etc etc..

Is this possible?

Thanks, regards.



You can do this to get the chip name:

Code: [Select]

#ifdef __AVR_ATmega1280
#ifdef __AVR_ATmega2560
#ifdef __AVR_ATmega128
#ifdef __AVR_ATmega8

There might be a way to read a byte in the bootloader that is unique to each arduino bootloader, also.


As the def is only a compiler directive I don't see how this helps getting it off a board. The boot loader has no number describing the board it is on.


The boot loader has no number describing the board it is on.

But you could distinguish between, say, the Uno and the Duemilanove by the actual bootloader -- the two bootloaders must be different in some way, and most boards have different bootloaders. It wouldn't be easy, but it's theoretically possible.

You can also use

Code: [Select]

#if F_CPU == 8000000
#if F_CPU == 16000000

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131