Pages: [1]   Go Down
Author Topic: How to get Arduino type?  (Read 258 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31429
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is this possible?
No.
Logged

Offline Offline
Edison Member
*
Karma: 17
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can do this to get the chip name:

Code:
#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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31429
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 17
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#if F_CPU == 8000000
#if F_CPU == 16000000
Logged

Pages: [1]   Go Up
Jump to: