Arduino doesn’t like the GitHub Code

Store Forums Game Timer Pro General Discussion Arduino doesn’t like the GitHub Code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14710

    Test compile of the source code from GitHub
    ——————————————–

    In file included from LowPower.cpp:32:0:
    LowPower.cpp: In member function ‘void LowPowerClass::powerExtStandby(period_t, adc_t, bod_t, timer2_t)’:
    LowPower.cpp:980:18: error: ‘SLEEP_MODE_EXT_STANDBY’ was not declared in this scope
    lowPowerBodOn(SLEEP_MODE_EXT_STANDBY);
    ^
    LowPower.cpp:980:4: note: in expansion of macro ‘lowPowerBodOn’
    lowPowerBodOn(SLEEP_MODE_EXT_STANDBY);
    ^
    LowPower.cpp:985:17: error: ‘SLEEP_MODE_EXT_STANDBY’ was not declared in this scope
    lowPowerBodOn(SLEEP_MODE_EXT_STANDBY);
    ^
    LowPower.cpp:985:3: note: in expansion of macro ‘lowPowerBodOn’
    lowPowerBodOn(SLEEP_MODE_EXT_STANDBY);
    ^

    #14711
    Michael
    Keymaster

    I don’t know how you are compiling it, but make sure you specify the board as an Arduino Uno. This code is just normal Arduino code for an ATmega328 MCU.

    The compilation error on line 980 implies that you are compiling for a different architecture.

    #if defined __AVR_ATmega328P__
    lowPowerBodOff(SLEEP_MODE_EXT_STANDBY);
    #else
    lowPowerBodOn(SLEEP_MODE_EXT_STANDBY); <- line 980 #endif

    #14712

    The only way you can compile in Arduino, by clicking the compile button.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.