How can one determine the board type (e.g. Uno vs Nano) of an Arduino at time of compile? Not to be confused with determining the processor type. As I see examples of this e.g. #if defined(__AVR_ATmega32U4__) ...

I would like a way, similarly, to determine between flavors of Arduino's all using the same processor of ATmega328.

The IDE knows board. So is it possible to access it from some pre-compiler #IF

The Nano has different interrupts vs. the Uno. Hence knowing board type at compile can automate the pin assignments for public libraries.

Edit
Report