OpenSprinkler Forums Third-Party Software Help, can't get arduino to compile OS without errors…

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

    Anonymous
    Inactive

    OK, I have a Ver 2.2 AVR Board, and I would like to add three adc inputs (Well water level, and two tank water levels, all 4-20ma sensors) to Open Sprinkler. I have a bit of programming experience, but not much. Looking at the docs for compiling OS, it looks like it was using Arduino Ver 1.0.6, and I found version 1.0.5 and installed it in win 10 64bit. Added the supplemental Hardware and firmware libraries, along with the SD library. Picked the 16mhz HW2.2 board in the board options, . Opening “mainArduino”, under Libraries/Open Sprinkler/Examples”, and clicked on compile – these were the resulting errors:
    In file included from C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp:22:
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:14: error: ISO C++ forbids initialization of member ‘_udpSetup’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:14: error: making ‘_udpSetup’ static
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:14: error: ISO C++ forbids in-class initialization of non-const static member ‘_udpSetup’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:16: error: ISO C++ forbids initialization of member ‘_poolServerName’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:16: error: making ‘_poolServerName’ static
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:16: error: invalid in-class initialization of static data member of non-integral type ‘const char*’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:17: error: ISO C++ forbids initialization of member ‘_port’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:17: error: making ‘_port’ static
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:17: error: ISO C++ forbids in-class initialization of non-const static member ‘_port’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:18: error: ISO C++ forbids initialization of member ‘_timeOffset’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:18: error: making ‘_timeOffset’ static
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:18: error: ISO C++ forbids in-class initialization of non-const static member ‘_timeOffset’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:20: error: ISO C++ forbids initialization of member ‘_updateInterval’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:20: error: making ‘_updateInterval’ static
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:20: error: ISO C++ forbids in-class initialization of non-const static member ‘_updateInterval’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:22: error: ISO C++ forbids initialization of member ‘_currentEpoc’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:22: error: making ‘_currentEpoc’ static
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:22: error: ISO C++ forbids in-class initialization of non-const static member ‘_currentEpoc’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:23: error: ISO C++ forbids initialization of member ‘_lastUpdate’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:23: error: making ‘_lastUpdate’ static
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\/NTPClient.h:23: error: ISO C++ forbids in-class initialization of non-const static member ‘_lastUpdate’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp: In constructor ‘NTPClient::NTPClient(UDP&, const char*)’:
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp:35: error: ‘class NTPClient’ has no member named ‘_poolServerName’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp: In constructor ‘NTPClient::NTPClient(UDP&, const char*, long int)’:
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp:41: error: ‘class NTPClient’ has no member named ‘_poolServerName’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp: In constructor ‘NTPClient::NTPClient(UDP&, const char*, long int, long unsigned int)’:
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp:47: error: ‘class NTPClient’ has no member named ‘_poolServerName’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp: In member function ‘void NTPClient::setPoolServerName(const char*)’:
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp:152: error: ‘class NTPClient’ has no member named ‘_poolServerName’
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp: In member function ‘void NTPClient::sendNTPPacket()’:
    C:\Users\jscma\Documents\Arduino\libraries\OpenSprinkler\NTPClient.cpp:172: error: ‘class NTPClient’ has no member named ‘_poolServerName’

    … Can anyone help point me in the right direction?

    I tried installing a more recent version of the arduino ide (1.8.?) , but you can’t slip in extra libraries like you can in the earlier versions it seems due to windows permissions stuff…

    John

    #61817

    Anonymous
    Inactive

    OK looks like I may have gotten further with Ver 1.8 of the Arduino IDE, I managed to get the IDE to display the opensprinkler boards, but now I get the following compile warnings and error:
    Warning: Board bootloaders:atmega:os23 doesn’t define a ‘build.board’ preference. Auto-set to: ATMEGA_OS23
    Warning: Board bootloaders:atmega:os21 doesn’t define a ‘build.board’ preference. Auto-set to: ATMEGA_OS21
    Warning: Board bootloaders:atmega:os20 doesn’t define a ‘build.board’ preference. Auto-set to: ATMEGA_OS20
    Warning: Board bootloaders:atmega:os22 doesn’t define a ‘build.board’ preference. Auto-set to: ATMEGA_OS22
    Warning: Board opensprinkler:avr:os22 doesn’t define a ‘build.board’ preference. Auto-set to: AVR_OS22
    Warning: Board opensprinkler:avr:os20 doesn’t define a ‘build.board’ preference. Auto-set to: AVR_OS20
    Warning: Board opensprinkler:avr:os23 doesn’t define a ‘build.board’ preference. Auto-set to: AVR_OS23
    Warning: Board opensprinkler:avr:os21 doesn’t define a ‘build.board’ preference. Auto-set to: AVR_OS21
    recipe.preproc.macros pattern is missing

    Error compiling for board OpenSprinklerHW2.2 (16MHz, Serial).

    Any ideas? Thanks in advance!

    John

    #61819

    Ray
    Keymaster

    I think v1.8 has different board definition file format. Basically, this is referring to step 4 of the built instructions for 2.x:
    https://openthings.freshdesk.com/support/solutions/articles/5000165132-how-to-compile-opensprinkler-firmware
    where you have downloaded the aopensprinkler.zip board profiles. You most likely need to open the boards.txt and add the missing build.board preferenc as the error message implies. You can take a look at the default arduino boards.txt to see examples of what build.board refers to.

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

OpenSprinkler Forums Third-Party Software Help, can't get arduino to compile OS without errors…