MyHelperFunctions.h error: expected unqualified-id before 'static'



  • Hi, So I had this 'WS2812 actuator' sketch running on a Nano with a nrf24 radio and I'm not converting it to run in a rs485 network. However I encounter the following when I try and compile it. I've uninstalled and re-installed the library, both via the IDE and directly downloading from github - to no avail

    Arduino: 1.8.13 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\z003rtbs\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\z003rtbs\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\UserData\z003rtbs\OneDrive - Siemens AG\Documents\Arduino\libraries -fqbn=arduino:avr:pro:cpu=16MHzatmega328 -ide-version=10813 -build-path C:\Users\z003rtbs\AppData\Local\Temp\arduino_build_449327 -warnings=none -build-cache C:\Users\z003rtbs\AppData\Local\Temp\arduino_cache_80315 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\z003rtbs\Nextcloud\Projects\Van\OpenHab\MySensors\RS485_WS2812_Actuator\RS485_WS2812_Actuator.ino
    
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\z003rtbs\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\z003rtbs\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\UserData\z003rtbs\OneDrive - Siemens AG\Documents\Arduino\libraries -fqbn=arduino:avr:pro:cpu=16MHzatmega328 -ide-version=10813 -build-path C:\Users\z003rtbs\AppData\Local\Temp\arduino_build_449327 -warnings=none -build-cache C:\Users\z003rtbs\AppData\Local\Temp\arduino_cache_80315 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\z003rtbs\Nextcloud\Projects\Van\OpenHab\MySensors\RS485_WS2812_Actuator\RS485_WS2812_Actuator.ino
    
    Using board 'pro' from platform in folder: C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
    
    Using core 'arduino' from platform in folder: C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
    
    Detecting libraries used...
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\sketch\\RS485_WS2812_Actuator.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    Alternatives for MySensors.h: [MySensors-master@2.3.2]
    
    ResolveLibrary(MySensors.h)
    
      -> candidates: [MySensors-master@2.3.2]
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\sketch\\RS485_WS2812_Actuator.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    Alternatives for SPI.h: [SPI@1.0]
    
    ResolveLibrary(SPI.h)
    
      -> candidates: [SPI@1.0]
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\sketch\\RS485_WS2812_Actuator.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    Alternatives for Adafruit_NeoPixel.h: [Adafruit_NeoPixel@1.7.0]
    
    ResolveLibrary(Adafruit_NeoPixel.h)
    
      -> candidates: [Adafruit_NeoPixel@1.7.0]
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\sketch\\RS485_WS2812_Actuator.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master\\MyASM.S" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src\\SPI.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel\\Adafruit_NeoPixel.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel\\esp.c" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel\\esp8266.c" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel\\kendyte_k210.c" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    Generating function prototypes...
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\sketch\\RS485_WS2812_Actuator.ino.cpp" -o "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
    
    "C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    
    Compiling sketch...
    
    "C:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\eightanaloginputs" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\MySensors-master" "-IC:\\Users\\z003rtbs\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\SPI\\src" "-IC:\\UserData\\z003rtbs\\OneDrive - Siemens AG\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\sketch\\RS485_WS2812_Actuator.ino.cpp" -o "C:\\Users\\z003rtbs\\AppData\\Local\\Temp\\arduino_build_449327\\sketch\\RS485_WS2812_Actuator.ino.cpp.o"
    
    In file included from C:\UserData\z003rtbs\OneDrive - Siemens AG\Documents\Arduino\libraries\MySensors-master/core/MyHelperFunctions.cpp:20:0,
    
                     from C:\UserData\z003rtbs\OneDrive - Siemens AG\Documents\Arduino\libraries\MySensors-master/MySensors.h:44,
    
                     from C:\Users\z003rtbs\Nextcloud\Projects\Van\OpenHab\MySensors\RS485_WS2812_Actuator\RS485_WS2812_Actuator.ino:45:
    
    C:\UserData\z003rtbs\OneDrive - Siemens AG\Documents\Arduino\libraries\MySensors-master/core/MyHelperFunctions.h:28:1: error: expected unqualified-id before 'static'
    
     static uint8_t convertH2I(const char c) __attribute__((unused));
    
     ^~~~~~
    
    C:\UserData\z003rtbs\OneDrive - Siemens AG\Documents\Arduino\libraries\MySensors-master/core/MyHelperFunctions.h:28:1: error: expected constructor, destructor, or type conversion before 'static'
    
    Using library MySensors-master at version 2.3.2 in folder: C:\UserData\z003rtbs\OneDrive - Siemens AG\Documents\Arduino\libraries\MySensors-master 
    
    Using library SPI at version 1.0 in folder: C:\Users\z003rtbs\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\libraries\SPI 
    
    Using library Adafruit_NeoPixel at version 1.7.0 in folder: C:\UserData\z003rtbs\OneDrive - Siemens AG\Documents\Arduino\libraries\Adafruit_NeoPixel 
    
    exit status 1
    
    Error compiling for board Arduino Pro or Pro Mini.
    
    
    

    Any and all help is appreciated.

    Adam


  • Mod

    @adds666 have you made any modifications to MyConfig.h ?

    Could you post MyConfig.h here?



  • Good morning @mfalkvidd

    I've not made amendements, I've tried to upload here, however received an error message with a 100% uploading. The library is 2.3.2 downlaoded from github.

    [0_1608024751465_MyConfig.h](Uploading 100%)


  • Mod

    @adds666 ok. Could you try removing and reinstalling the MySensors library?



  • @mfalkvidd just removed from the operating directory and installed via the Library Manager in the IDE - still same error.

    Interestingly my RS485 Gateway sketch (Using the same library) compiles fine!

    RS485GW (compiles fine)

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enable RS485 transport layer
    #define MY_RS485
    
    // Define this to enables DE-pin management on defined pin
    #define MY_RS485_DE_PIN 2
    
    // Set RS485 baud rate to use
    #define MY_RS485_BAUD_RATE 9600
    
    // Enable this if RS485 is connected to a hardware serial port
    //#define MY_RS485_HWSERIAL Serial1
    
    // Enable serial gateway
    #define MY_GATEWAY_SERIAL
    
    
    // Enable inclusion mode
    //#define MY_INCLUSION_MODE_FEATURE
    // Enable Inclusion mode button on gateway
    //#define MY_INCLUSION_BUTTON_FEATURE
    // Set inclusion mode duration (in seconds)
    //#define MY_INCLUSION_MODE_DURATION 60
    // Digital pin used for inclusion mode button
    //#define MY_INCLUSION_MODE_BUTTON_PIN  3
    
    // Set blinking period
    #define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Flash leds on rx/tx/err
    #define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
    #define MY_DEFAULT_RX_LED_PIN  5  // Receive led pin
    #define MY_DEFAULT_TX_LED_PIN  6  // the PCB, on board LED
    
    #include <MySensors.h>
    
    void setup()
    {
        // Setup locally attached sensors
    }
    
    void presentation()
    {
        // Present locally attached sensors
    }
    
    void loop()
    {
        // Send locally attached sensor data here
    }
    

    RS485_WS2812_actuator (does not compile)

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Activate one of these
    
    //#define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    #define MY_RS485
    
    #define MY_RS485_DE_PIN 2
    
    // Set RS485 baud rate to use
    #define MY_RS485_BAUD_RATE 9600
    
    #include <MySensors.h>
    #include <SPI.h>
    #include <Adafruit_NeoPixel.h>
    
    #define NUMPIXELS 58   // FIXME Number of connected pixels on a single datapin - Must be less than 500 due to RAM issues
    #define PIN 4         // Digital output pin
    
    #define MY_NODE_ID 1 // FIXME this needs to be decided and updated for this exact WS2812 node 
    #define CHILD_ID 0
    
    
    Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
    long RGB_values[3] = {0,0,0};
    
    void presentation()  
    { 
      sendSketchInfo("RS485_WS2812_Actuator", "1.0");
      present(CHILD_ID, S_RGB_LIGHT);
    }
    
    
    void setup()
    {
      Serial.begin(9600);
      Serial.println("Starting");
        strip.begin();
        strip.show(); // Update the strip, to start they are all 'off'
    }
    
    
    void loop()
    {
        
    }
    
    void receive(const MyMessage &message) {
        if (message.type==V_RGB) {
      // starting to process the hex code
            String hexstring = message.getString(); //here goes the hex color code coming from through MySensors (like FF9A00)
            long number = (long) strtol( &hexstring[0], NULL, 16);
            RGB_values[0] = number >> 16;
            RGB_values[1] = number >> 8 & 0xFF;
            RGB_values[2] = number & 0xFF;
    
            colorWipe(Color(RGB_values[0],RGB_values[1],RGB_values[2]), 30);
         }
         
        if (message.type==V_DIMMER) {
          strip.setBrightness(round((2.55*message.getInt())));
          strip.show();
          }
          
        if (message.type==V_LIGHT) {
           if (message.getInt() == 0) {
            strip.clear();
            strip.show();
           }
        }
      
    }
     
    void colorWipe(uint32_t c, uint8_t wait) {
      int i;
     
      for (i=0; i < strip.numPixels(); i++) {
          strip.setPixelColor(i, c);
          strip.show();
          delay(wait);
      }
    }
    
        /* Helper functions */
    
    // Create a 15 bit color value from R,G,B
    uint32_t Color(byte r, byte g, byte b)
    {
      uint32_t c;
      c = r;
      c <<= 8;
      c |= g;
      c <<= 8;
      c |= b;
      return c;
    }
        
    

  • Mod

    very strange. That sketch compiles fine on my machine:

    Using library MySensors at version 2.3.2 in folder: R:\Documents\Arduino\libraries\MySensors 
    Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI 
    Using library Adafruit_NeoPixel at version 1.1.7 in folder: R:\Documents\Arduino\libraries\Adafruit_NeoPixel 
    "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Micke\\AppData\\Local\\Temp\\ArduinoBuild/sketch_dec15a.ino.elf"
    Sketch uses 18062 bytes (58%) of program storage space. Maximum is 30720 bytes.
    Global variables use 710 bytes (34%) of dynamic memory, leaving 1338 bytes for local variables. Maximum is 2048 byte
    

    What Arduino are you using?


  • Mod

    btw, if you want #define MY_NODE_ID 1 to have any effect, the define must be before including MySensors.h (same applies to all other MySensors defines).

    You should have gotten this error:

    C:\Users\Micke\AppData\Local\Temp\arduino_modified_sketch_343605\sketch_dec15a.ino:22:0: warning: "MY_NODE_ID" redefined
    


  • @mfalkvidd I had it running on a nano.
    Now trying to put it in a mini pro.

    However, cant get it to compile on either or an uno.

    I'll re-install the IDE now and report back



  • No way - found it. Large comment at the top of sketch (not copied to this forum) had a line of *********s across the top.

    Removed and all ok. Thanks for your help anyway @mfalkvidd


Log in to reply
 

Suggested Topics

  • 24
  • 11
  • 6
  • 14
  • 6
  • 11
  • 5
  • 6

225
Online

10.1k
Users

10.6k
Topics

109.0k
Posts