OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266

Tagged: ,

This topic contains 138 replies, has 18 voices, and was last updated by  Jisse154 6 days ago.

Viewing 15 posts - 91 through 105 (of 139 total)
  • Author
    Posts
  • #46605

    ja.charer
    Participant

    @pbecchi and @argjoe

    What ESP8266ping.h you are using? I can’t find <Arduino-Ping-master\ESP8266ping.h> library declared in EtherCardW5100.h I’ve downloaded this one https://github.com/dancol90/ESP8266Ping and looks like this library is causing some problems.
    I’m trying to accomplish same goal as argjoe to have minimal HW system as posible to be controlled over html or/and OpenHAB. And please be patient whit me πŸ™‚ I’m beginner…

    Regards
    Charer

    Attachments:
    1. error.txt
    #46607

    avgjoe
    Participant

    And here is my hardware pin config form another sketch:

    pinMode(12, OUTPUT);
    pinMode(13, OUTPUT);
    pinMode(14, OUTPUT);
    pinMode(16, OUTPUT);
    pinMode(4, OUTPUT);
    pinMode(5, OUTPUT);
    pinMode(15, OUTPUT);
    pinMode(10, OUTPUT);

    Those are the 8 zone pins.

    #46608

    avgjoe
    Participant

    ESP8266ping is nowhere in my project. I don’t see it in EtherCardW5100.h I did not look at your error file but you probably have a lot of extra files like I did if you downloaded the zip as a start. Once I get a working complete version. I can upload my files. But you will have to wait.

    #46612

    pbecchi
    Participant

    Hi guys

    I don’t advise anybody , especially beginners , to change the code for their needs!
    Of course this is Open Source and you are free to do it, but I will not follow you on that!

    The only thing to do , to adjust the code to your HW configuration, is to modify pins.h file where all the modifiable code flags (#define) are located.
    To do that :choose one of the 11 proto cases, the one better for your needs and modify the value of the #define there.
    Minimum HW configuration is proto 11!

    • This reply was modified 2 years ago by  pbecchi.
    #46615

    ja.charer
    Participant

    Hi,
    My intention is not to change the code at all, I just want to compile a minimal configuration as possible. 11 proto case looks perfect for me but won’t compile. I will try again from scrath. In meantime I order some HW as suggested Real Time Clock may be useful.
    @avgjoe I can’t wait when you succeed.

    Regards

    #47472

    ja.charer
    Participant

    Hello again,
    My instance of Opensprinkler on ESP8266 work sins two mount now whit out any significant problems. I can complain only speed but to be honest this is not big issue. However just after initial compilations I’ve observed strange behavior.

    After power up device always end-up in WiFi Manager mode. Entering password and WiFi Name and soft reset switched device in operational mode. Hard reset and again WiFi Manager mode. After some googling I’ve found solution. Adding below two lines in to “bool EtherCardW5100::WiFiconnect()” in file EtherCard5100.cpp (after DEBUG_PRINTLN(“Wait WIFI…”);) totally solved the issue.

    Added lines:
    WiFi.disconnect();
    WiFi.setAutoConnect(true);

    Hope this will be usable for anyone.
    Regards

    • This reply was modified 1 year, 10 months ago by  ja.charer.
    #47742

    Ray
    Keymaster

    Just encountered this thread again, and it seems I haven’t mentioned in this threads that the OS 3.0 released earlier this year is an ESP8266-based OpenSprinkler, and the OpenSprinkler firmware has been modified to support this new hardware:
    https://github.com/OpenSprinkler/OpenSprinkler-Firmware

    I see a lot of references to EtherCardW5100 in this thread — I am a bit confused: does the custom hardware build here include a W5100 Ethernet controller? That’s for wired Ethernet (W5100 chip). If not, what’s the reference to W5100 for?

    #47824

    pbecchi
    Participant

    Hi Ray
    This name is an heritage of the branch I have used to start my port to Esp8266. I have started from a 2016 branch from Dave1001 that had the scope to port OS to Arduino Mega with a Ethernet shield.

    #47955

    Ray
    Keymaster

    Ah, ok, makes sense. Thanks for clarifying it.

    #48101

    TeguhTeknisi
    Participant

    Hi @pbecchi

    In this Post https://opensprinkler.com/forums/topic/opensprinkler-on-esp8266/#post-41685
    You have build OpenSprinkler with NodeMCU and 74HC595
    Because i have alot 74HC595, i want to make it.

    Please help me, can i have the schematic and the code?

    Thanks.

    Best Regrads,
    Teguh

    Edit:
    I have choose Proto = 1
    But still failed to compile….

    Try to choode Proto = 8 (OSBee)
    But still failed.

    Here the error:

    sketch/PCF8574Mio - Copia.cpp:27:6: error: prototype for 'void PCF8574::begin(int)' does not match any in class 'PCF8574'
     void PCF8574::begin(int address)
          ^
    In file included from sketch/PCF8574Mio - Copia.cpp:21:0:
    PCF8574Mio.h:35: error: candidate is: void PCF8574::begin(uint8_t)
      void begin(uint8_t address);
           ^
    In file included from sketch/PCF8574Mio - Copia.cpp:23:0:
    /home/sukanime/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/Wire/Wire.h: In member function 'uint8_t PCF8574::read8()':
    /home/sukanime/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/Wire/Wire.h:69:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
         uint8_t requestFrom(int, int);
                 ^
    /home/sukanime/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/Wire/Wire.h:67:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
         uint8_t requestFrom(uint8_t, uint8_t);
                 ^
    sketch/PCF8574Mio - Copia.cpp:41:2: error: '_data' was not declared in this scope
      _data = Wire.read();
      ^
    sketch/PCF8574Mio - Copia.cpp: At global scope:
    sketch/PCF8574Mio - Copia.cpp:47:9: error: prototype for 'uint8_t PCF8574::value()' does not match any in class 'PCF8574'
     uint8_t PCF8574::value()
             ^
    In file included from sketch/PCF8574Mio - Copia.cpp:21:0:
    PCF8574Mio.h:38: error: candidate is: uint8_t PCF8574::value() const
      uint8_t value() const { return _dataIn; };
              ^
    sketch/PCF8574Mio - Copia.cpp: In member function 'void PCF8574::write8(uint8_t)':
    sketch/PCF8574Mio - Copia.cpp:55:2: error: '_data' was not declared in this scope
      _data = value;
      ^
    sketch/PCF8574Mio - Copia.cpp: In member function 'uint8_t PCF8574::read(uint8_t)':
    sketch/PCF8574Mio - Copia.cpp:63:10: error: '_data' was not declared in this scope
      return (_data & (1 << pin)) > 0;
              ^
    sketch/PCF8574Mio - Copia.cpp: In member function 'void PCF8574::write(uint8_t, uint8_t)':
    sketch/PCF8574Mio - Copia.cpp:71:3: error: '_data' was not declared in this scope
       _data &= ~(1 << pin);
       ^
    sketch/PCF8574Mio - Copia.cpp:75:3: error: '_data' was not declared in this scope
       _data |= (1 << pin);
       ^
    sketch/PCF8574Mio - Copia.cpp:78:18: error: '_data' was not declared in this scope
      PCF8574::write8(_data);
                      ^
    sketch/PCF8574Mio - Copia.cpp: In member function 'void PCF8574::toggle(uint8_t)':
    Multiple libraries were found for "Dns.h"
    sketch/PCF8574Mio - Copia.cpp:84:2: error: '_data' was not declared in this scope
     Used: /home/sukanime/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/Ethernet
      _data ^= (1 << pin);
      ^
    sketch/PCF8574Mio - Copia.cpp: In member function 'void PCF8574::shiftRight(uint8_t)':
    sketch/PCF8574Mio - Copia.cpp:92:2: error: '_data' was not declared in this scope
    • This reply was modified 1 year, 8 months ago by  TeguhTeknisi. Reason: Failed to compile
    • This reply was modified 1 year, 8 months ago by  TeguhTeknisi. Reason: code tag
    #48113

    TeguhTeknisi
    Participant

    I Try to Compile Proto = 8

    But i got this error:

    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:15: error: 'uint8_t' has not been declared
      bool begin(uint8_t csPin = SS, uint8_t divisor = 2){}
                 ^
    SPIFFSdFat.h:15: error: 'uint8_t' has not been declared
      bool begin(uint8_t csPin = SS, uint8_t divisor = 2){}
                                     ^
    SPIFFSdFat.h:17: error: 'uint8_t' has not been declared
      bool cardBegin(uint8_t csPin = SS, uint8_t divisor = 2){}
                     ^
    SPIFFSdFat.h:17: error: 'uint8_t' has not been declared
      bool cardBegin(uint8_t csPin = SS, uint8_t divisor = 2){}
                                         ^
    SPIFFSdFat.h:15: error: 'SS' was not declared in this scope
      bool begin(uint8_t csPin = SS, uint8_t divisor = 2){}
                                 ^
    SPIFFSdFat.h:17: error: 'SS' was not declared in this scope
      bool cardBegin(uint8_t csPin = SS, uint8_t divisor = 2){}
                                     ^
    SPIFFSdFat.cpp:9: error: redefinition of 'SdFile::SdFile()'
         SdFile::SdFile() {  }
         ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:24: error: 'SdFile::SdFile()' previously defined here
      SdFile(){}
      ^
    SPIFFSdFat.cpp:10: error: redefinition of 'bool SdFile::open(char*, int)'
      bool SdFile::open(char nome[], int i) {
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:25: error: 'bool SdFile::open(char*, int)' previously defined here
      bool open(char name[], int i){} 
           ^
    SPIFFSdFat.cpp:17: error: redefinition of 'void SdFile::close()'
      void SdFile::close() { MyFile.close(); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:26: error: 'void SdFile::close()' previously defined here
      void close(){}
           ^
    SPIFFSdFat.cpp:18: error: redefinition of 'void SdFile::seekEnd()'
      void SdFile::seekEnd() { MyFile.seek(0,SeekEnd); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:27: error: 'void SdFile::seekEnd()' previously defined here
      void seekEnd(){}
           ^
    SPIFFSdFat.cpp:19: error: redefinition of 'void SdFile::seekSet(int)'
      void SdFile::seekSet(int pos) { MyFile.seek(pos,SeekSet); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:28: error: 'void SdFile::seekSet(int)' previously defined here
      void seekSet(int pos){}
           ^
    SPIFFSdFat.cpp:20: error: redefinition of 'bool SdFile::fgets(char*, int)'
      bool SdFile::fgets(char buf[], int bufflen) { return MyFile.readBytesUntil('\n',buf, bufflen)); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:29: error: 'bool SdFile::fgets(char*, int)' previously defined here
      bool fgets(char buf[], int bufflen){}
           ^
    SPIFFSdFat.cpp:21: error: redefinition of 'void SdFile::write(char*)'
      void SdFile::write(char * c) { MyFile.print(c); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:30: error: 'void SdFile::write(char*)' previously defined here
      void write(char *){}
           ^
    SPIFFSdFat.cpp:22: error: redefinition of 'void SdFile::write(char*, int)'
      void SdFile::write(char * c, int l) { for (int i = 0; i < l;i++) MyFile.print(c+i); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:31: error: 'void SdFile::write(char*, int)' previously defined here
      void write(char *, int l){}
           ^
    SPIFFSdFat.cpp:23: error: redefinition of 'void SdFile::write(const char*, int)'
      void SdFile::write(const char * c, int l) { for (int i = 0; i < l; i++) MyFile.print(c + i); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:32: error: 'void SdFile::write(const char*, int)' previously defined here
      void write(const char *, int l){}
           ^
    SPIFFSdFat.cpp:26: error: redefinition of 'SdFat::SdFat()'
      SdFat::SdFat() { SPIFFS_formatted = eeprom_read_byte((void *)SPIFFS_F_BY); }
      ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:9: error: 'SdFat::SdFat()' previously defined here
      SdFat(){}
      ^
    SPIFFSdFat.cpp:27: error: redefinition of 'void SdFat::remove(char*)'
      void SdFat::remove(char data[]) { SPIFFS.remove(data); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:10: error: 'void SdFat::remove(char*)' previously defined here
      void remove(char data[]){}
           ^
    SPIFFSdFat.cpp:28: error: redefinition of 'bool SdFat::exists(char*)'
      bool SdFat::exists(char* buf) { SPIFFS.exists(buf); }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:11: error: 'bool SdFat::exists(char*)' previously defined here
      bool exists(char* buf){}
           ^
    SPIFFSdFat.cpp:29: error: redefinition of 'bool SdFat::mkdir(char*)'
      bool SdFat::mkdir(char data[]) {}
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:12: error: 'bool SdFat::mkdir(char*)' previously defined here
      bool mkdir(char data[]){}
           ^
    SPIFFSdFat.cpp:30: error: redefinition of 'bool SdFat::chdir(char*)'
      bool SdFat::chdir(char data[]) { int i; while (data[i] != 0) FULLName[i++] = data[i]; FULLName[i] = '\0'; }
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:13: error: 'bool SdFat::chdir(char*)' previously defined here
      bool chdir(char data[]){}
           ^
    SPIFFSdFat.cpp:31: error: redefinition of 'char* SdFat::vwd()'
      char *  SdFat::vwd() {}//da correggere--------------------------------------------------cerca chiamata ///////////
              ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:14: error: 'char* SdFat::vwd()' previously defined here
      char *  vwd(){}//da correggere--------------------------------------------------cerca chiamata ///////////
              ^
    SPIFFSdFat.cpp:32: error: prototype for 'bool SdFat::begin(uint8_t, uint8_t)' does not match any in class 'SdFat'
      bool SdFat::begin(uint8_t csPin = SS, uint8_t divisor = 2) {
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:15: error: candidate is: bool SdFat::begin(int, int)
      bool begin(uint8_t csPin = SS, uint8_t divisor = 2){}
           ^
    SPIFFSdFat.cpp:38: error: prototype for 'bool SdFat::cardBegin(uint8_t, uint8_t)' does not match any in class 'SdFat'
      bool SdFat::cardBegin(uint8_t csPin = SS, uint8_t divisor = 2) {
           ^
    In file included from sketch/SPIFFSdFat.cpp:1:0:
    SPIFFSdFat.h:17: error: candidate is: bool SdFat::cardBegin(int, int)
      bool cardBegin(uint8_t csPin = SS, uint8_t divisor = 2){}
           ^
    Multiple libraries were found for "LiquidCrystal_I2C.h"
     Used: /home/sukanime/Arduino/libraries/LiquidCrystal
     Not used: /home/sukanime/Arduino/libraries/ESP8266-I2C-LCD1602
     Not used: /home/sukanime/Arduino/libraries/ESP8266-I2C-LCD1602
     Not used: /home/sukanime/Arduino/libraries/ESP8266-I2C-LCD1602
     Not used: /home/sukanime/Arduino/libraries/ESP8266-I2C-LCD1602
    Multiple libraries were found for "Dns.h"
     Used: /home/sukanime/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/Ethernet
     Not used: /opt/arduino-1.8.3/libraries/Ethernet
     Not used: /opt/arduino-1.8.3/libraries/Ethernet
     Not used: /opt/arduino-1.8.3/libraries/Ethernet
     Not used: /opt/arduino-1.8.3/libraries/Ethernet
    exit status 1
    'uint8_t' has not been declared
    • This reply was modified 1 year, 8 months ago by  TeguhTeknisi.
    #48118

    1073137775
    Participant

    Try replacing β€˜()’ and β€˜!’ with β€˜@’ and β€˜.’.

    PCBA

    #48122

    TeguhTeknisi
    Participant

    To bad in this forum board doesn’t have a quote reply, so i quote your reply.

    @1073137775
    Try replacing β€˜()’ and β€˜!’ with β€˜@’ and β€˜.’.

    PCBA

    Thanks for the reply, this forum seem “lonely” without you, but i think you are a spamer.
    so i hope someone else to reply.

    • This reply was modified 1 year, 8 months ago by  TeguhTeknisi. Reason: typo
    #48124

    pbecchi
    Participant

    Hi Teguh

    It look like you are compiling the wrong library , you should NOT USE spiffsdfat library !
    For some reason , probably wrong define in pins.h , you are including spiffsdfat.h !
    Verify where this appends and what define is causing this!
    Regarding choise of prototype …I believe you could start with proto n.1 :
    It use a shift register
    A i2c 20×4 LCD
    A i2c Real time clock
    Analog GPio is used for Button input
    I will prepare a hardware schematic of you tell me what you want to use!

    #48135

    TeguhTeknisi
    Participant

    Hi @pbecchi

    Thanks for the reply.
    I Will Use 8 Channel Relay Module, so it have LOW On,
    And I will use OLED SSD1306,
    it will glad if could change the code.

    I will try to compile it again with Arduino IDE 1.8.3 64 bit + esp8266 v2.3.0 on Kubuntu Linux 17.04.
    Because Linux is case sensitif, and using / for path, i got a lot of work when compile your.

    FYI, I can compile OpenSprinkler-Firmware from Ray commit be0369d , without much work.
    my arduino library is only:
    Adafruit_Circuit_Playground, Adafruit-GFX-Library, arduino_424003, Firmata, Robot_Control, Robot_IR_Remote, Robot_Motor, SSD1306
    With just that library, i can compile OpenSprinkler-Firmware and upload it with this step:
    – then estrak it and rename the folder OpenSprinkler-Firmware-master to OpenSprinkler
    – then rename mainArduino.ino to OpenSprinkler.ino
    – after that, i put OpenSprinkler folder above to ~/Arduino/
    – Download https://github.com/squix78/esp8266-oled-ssd1306/releases version 3.2.7, extract it and rename the folder to SSD1306
    then move folder SSD1306 to ~/Arduino/libraries/
    – then open OpenSprinkler.ino from the folder ~/Arduino/OpenSprinkler/ with Arduino IDE
    – then Compile and Upload it to WeMos D1 Mini

    For your mod , Here my step by step:
    – I get github ForOS_Bee2_0-OS_Solar-OS_3_0 commit 03f15ae on 7 Jun 2017
    – Then rename the folder OpenSprinkler_Arduino_V_2_1_6 to OpenSprinkler_ESP8266_V_2_1_6
    – Then move the folder OpenSprinkler_ESP8266_V_2_1_6 to ~/Arduino/
    – Then Go to ~/Arduino/OpenSprinkler_ESP8266_V_2_1_6/
    – Change the Pin.h to proto 1

    #define PROTO 1    ///////////////////////board type selection////////////
    /////////////////////////////////////////////////////////////////////////
    //////////////////////////////proto board 1////////////rear garden//////////////////////////////////
    #if PROTO==1 // shift register 
    
    #define SDA_PIN D5                         //:redefined 
    #define SCL_PIN D2                         //:redefined
    //#define OPENSPRINKLER_ARDUINO_W5100      //:required for ESP8266 not using shift registers
    #undef OPENSPRINKLER_ARDUINO_DISCRETE      //:shift registers
    #define SHIFT_REG
    #define BUTTON_ADC_PIN		 A0            // A0 is the button ADC input				//:analog buttons
    #define LCDI2C								//:i2c LCD
    #define SPIFFSDFAT							//:no sd ....EMULATED ON fLASH
    #define ADDITIONAL_SENSORS ESP8266_C         //:additional sensors to ESP 
    //#undef EEPROM_ESP                            //modify in libsel.h  EEPROM is now on flash
    
    #elif PROTO==2

    as you can see, in the Pin.h for Proto = 1 using #define SPIFFSDFAT
    So i will delete it.

    #define PROTO 1    ///////////////////////board type selection////////////
    /////////////////////////////////////////////////////////////////////////
    //////////////////////////////proto board 1////////////rear garden//////////////////////////////////
    #if PROTO==1 // shift register 
    
    #define SDA_PIN D5                         //:redefined 
    #define SCL_PIN D2                         //:redefined
    //#define OPENSPRINKLER_ARDUINO_W5100      //:required for ESP8266 not using shift registers
    #undef OPENSPRINKLER_ARDUINO_DISCRETE      //:shift registers
    #define SHIFT_REG
    #define BUTTON_ADC_PIN		 A0            // A0 is the button ADC input				//:analog buttons
    #define LCDI2C								//:i2c LCD
    #define ADDITIONAL_SENSORS ESP8266_C         //:additional sensors to ESP 
    //#undef EEPROM_ESP                            //modify in libsel.h  EEPROM is now on flash
    
    #elif PROTO==2

    – Remove file EtherCardW5100_o.cpp and EtherCardW5100_o.h

    – Open File OpenSprinkler_ESP8266_V_2_1_6.ino using Arduino IDE
    Then Hit Verify….

Viewing 15 posts - 91 through 105 (of 139 total)

You must be logged in to reply to this topic.

OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266