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.
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.
Is this possible?
No.
You can do this to get the chip name:
#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.
Grumpy_Mike:
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
#if F_CPU == 8000000
#if F_CPU == 16000000