Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 2
    Since the library seems to be compatible with all AVR-based Arduinos, it is probably best to test for #if __AVR__ (or #ifdef __AVR__) rather than for specific MCUs. Commented Oct 13, 2016 at 10:39
  • @KIIV I tried #if defined AVR and it accepts, but for #if defined(AVR_ATmega328), I could not find the expected solution. Can you suggest any link which explains more on this? Commented Oct 14, 2016 at 6:06
  • @goddland_16 That was an example. Arduino MEGA 2560 uses __AVR_ATmega2560__. You can check label on the MCU. Commented Oct 14, 2016 at 6:28
  • 1
    @per1234: Fixed, copy&paste error as usual... Commented Oct 14, 2016 at 9:25
  • 1
    @KIIV yeah checked it. Working and for UNO it is [AVR_ATmega328P] . Commented Oct 14, 2016 at 9:52