pzuid
1
I am using in an existing sketch the code below to identify board type:
// detect board type
#if defined(AVR_ATmega1280) || defined(AVR_ATmega2560) || defined(STM32H747XIH6)
#define BOARD_MEGA 1
#elif defined(AVR_ATmega328P) || defined(AVR_ATmega328) || defined(AVR_ATmega168)
#define BOARD_UNO 1
#elif defined(ARDUINO_ARCH_ARC32) // Intel Curie/101
#define BOARD_101 1
#include "CurieTimerOne.h"
#else
#error Cannot identify board
#endif
But now I have a arduino Giga and I cannot find the right board name.
i tried <Board_Identify.h> but than I receive:
#warning "Controller: Unknown Controller Model"
Any help on this?
J-M-L
2
when you compile, look for the -D
flag in some of the compile lines
you'll see things like
-DARDUINO=10819 -DARDUINO_GIGA -DARDUINO_ARCH_MBED_GIGA -DARDUINO_ARCH_MBED
those are defined values you can use
#if defined(ARDUINO_GIGA)
...
b707
3
by the way....
Why the mcu STM32H747XIH6 you considered as BOARD_MEGA?
J-M-L
5
good
and hopefully your learnt how to find that for the next board
have fun
1 Like
system
Closed
6
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.