Sanguino and Microduino core+ both uses ATMEGA644PA. I need to write a piece of code in my library where I need to check what board has been selected.
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
# define TIMER_PWM_PIN 11 // Arduino Mega
#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)// Sanguino or microduino
# define TIMER_PWM_PIN 13 //Sanguino PD5
#elif defined(__AVR_ATtiny84__)
# define TIMER_PWM_PIN 6
#else
# define TIMER_PWM_PIN 9 // Arduino Duemilanove, Diecimila, LilyPad, etc
#endif
If I used the above code #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)// Sanguino or Microduino will be true for both Microduino and Sanguino.
Is there a way I can know which one is it?
Here is the board.txt section for Microduino core +
##Microduino Core+ (644pa)
##############################################################
644p.name= Microduino/mCookie-Core+ (644pa)
644p.upload.tool=avrdude
644p.upload.protocol=arduino
644p.bootloader.tool=avrdude
644p.bootloader.unlock_bits=0x3F
644p.bootloader.lock_bits=0x0F
644p.build.board=AVR_PLUS
644p.build.core=arduino
644p.build.variant=plus
_BOARD_xxxx_macro you can examine? – Majenko Apr 22 '16 at 10:10