OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266

Viewing 25 posts - 101 through 125 (of 172 total)
  • Author
    Posts
  • #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
    #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.

    #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….

    #48136

    TeguhTeknisi
    Participant

    Here the error when i compile your:
    1. Time.h not found, so i download https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/Time.h , https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/TimeLib.h and https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/Time.cpp and put it in the folder OpenSprinkler_ESP8266_V_2_1_6
    Edit OpenSprinkler.h line 46 from #include <Time.h> to #include “Time.h”

    sketch/OpenSprinkler.h:46:19: fatal error: Time.h: No such file or directory
      #include <Time.h>

    2. LiquidCrystal_I2C.h – Download version 1.3.4 – https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/NewliquidCrystal_1.3.4.zip then extract it, move the Folder NewliquidCrystal inside the package to ~/Arduino/libraries/ , the Restart Arduino IDE

    sketch/OpenSprinkler.h:55:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
     #include <LiquidCrystal_I2C.h>

    3. In OpenSprinkler.h Line 53, I Change #include “lib\Adafruit_SSD1306.h” to #include “lib/Adafruit_SSD1306.h”

    4. DS1307RTC.h – Download https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/DS1307RTC.cpp and https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/DS1307RTC.h and put it in the folder OpenSprinkler_ESP8266_V_2_1_6
    Then edit OpenSprinkler.h , then rename from #include <DS1307RTC.h> to #include “DS1307RTC.h”

    sketch/OpenSprinkler.h:61:24: fatal error: DS1307RTC.h: No such file or directory
      #include <DS1307RTC.h>

    5. ESP8266ping.h – Try to google Arduino-Ping, i found this https://github.com/BlakeFoster/Arduino-Ping , but i cannot find ESP8266ping.h
    So i try to google ESP8266Ping.h, then i found this https://github.com/dancol90/ESP8266Ping , so i use it, then extract and put it in ~/Arduino/libraries/ , the Restart Arduino IDE
    Then edit EtherCardW5100.h line 58 and rename #include <Arduino-Ping-master\ESP8266ping.h>` to #include <ESP8266Ping.h>

    sketch/EtherCardW5100.h:58:45: fatal error: Arduino-Ping-master\ESP8266ping.h: No such file or directory
     #include <Arduino-Ping-master\ESP8266ping.h>

    6. WiFiManager.h – Download https://github.com/tzapu/WiFiManager/archive/0.12.tar.gz , then extract and put it in ~/Arduino/libraries/ , the Restart Arduino IDE

    sketch/EtherCardW5100.h:66:72: fatal error: WiFiManager.h: No such file or directory
     #include <WiFiManager.h>         //https://github.com/tzapu/WiFiManager

    7. Utils.h – Edit OpenSprinkler.h line 87 , rename <strong>Utils.h</strong> to <strong>utils.h</strong>

    sketch/OpenSprinkler.h:87:19: fatal error: Utils.h: No such file or directory
     #include "Utils.h"

    8. Time.h and DS1307RTC.h in OpenSprinkler_ESP8266_V_2_1_6.ino, so edit it, rename from <strong><Time.h></strong> to <strong>”Time.h”</strong> then <strong><DS1307RTC.h></strong> to <strong>”DS1307RTC.h”</strong>

    /home/sukanime/Arduino/OpenSprinkler_ESP8266_V_2_1_6/OpenSprinkler_ESP8266_V_2_1_6.ino:84:19: fatal error: Time.h: No such file or directory
      #include <Time.h>
    /home/sukanime/Arduino/OpenSprinkler_ESP8266_V_2_1_6/OpenSprinkler_ESP8266_V_2_1_6.ino:86:24: fatal error: DS1307RTC.h: No such file or directory
      #include <DS1307RTC.h>

    9. EEPROM_ESP.h – Edit Eeprom_ESP.cpp , rename <strong>EEPROM_ESP.h</strong> to <strong>Eeprom_ESP.h</strong>

    sketch/Eeprom_ESP.cpp:3:24: fatal error: EEPROM_ESP.h: No such file or directory
     #include "EEPROM_ESP.h"

    10. Gpio.h – Edit OpenSprinkler.cpp line 25, rename <strong>Gpio.h</strong> to g<strong>pio.h</strong>

    sketch/OpenSprinkler.cpp:25:18: fatal error: Gpio.h: No such file or directory
     #include "Gpio.h"
    #48139

    TeguhTeknisi
    Participant

    Here again the error:
    11. Weather.h – Edit OpenSprinklerMain.cpp line 34, rename Weather.h to weather.h

    sketch/OpenSprinklerMain.cpp:34:21: fatal error: Weather.h: No such file or directory
     #include "Weather.h"

    12. Gpio.h – Edit gpio.cpp line 24, rename Gpio.h to gpio.h

    sketch/gpio.cpp:24:18: fatal error: Gpio.h: No such file or directory
     #include "Gpio.h"

    14. Utils.h – Edit utils.cpp line 24, rename Utils.h to gutils.h

    sketch/utils.cpp:24:19: fatal error: Utils.h: No such file or directory
     #include "Utils.h"

    15. TimeLib.h , Edit utils.cpp line 26, rename <TimeLib.h> to g“TimeLib.h”

    sketch/utils.cpp:26:21: fatal error: TimeLib.h: No such file or directory
     #include <TimeLib.h>

    16. Utils.h – Edit weather.cpp line 42, rename Utils.h to gutils.h

    sketch/weather.cpp:42:19: fatal error: Utils.h: No such file or directory
     #include "Utils.h"
    #48140

    TeguhTeknisi
    Participant

    Here again the error:
    17. MS7 , edit OpenSprinkler.cpp line 1359, and add #define MS7 7-s

    sketch/OpenSprinkler.cpp: In static member function 'static void OpenSprinkler::apply_all_station_bits()':
    OpenSprinkler.cpp:1359: error: 'MS7' was not declared in this scope
        byte y = (sbits & ((byte)1 << (MS7))) ? HIGH : LOW;

    I hope this edit is right:

    #ifndef OSPI
    #define MS7 7-s
    			byte y = (sbits & ((byte)1 << (MS7))) ? HIGH : LOW;
    			
    			digitalWrite ( PIN_SR_DATA, (sbits & ((byte)1 << (MS7))) ? HIGH : LOW);
    #endif

    18. DS1307RTC trouble, so i change the DS1307RTC library from Ray OpenSprinkler to https://github.com/PaulStoffregen/DS1307RTC/archive/1.4.tar.gz , then extract it to ~/Arduino/libraries/
    Then Undo the previsous edit (step 4 & 8) and delete file DS1307RTC.cpp and DS1307RTC.h

    OpenSprinklerMain.cpp:83: error: 'DS1307RTC' does not name a type
     extern DS1307RTC RTC;
            ^
    sketch/OpenSprinklerMain.cpp: In function 'void do_setup()':
    OpenSprinklerMain.cpp:321: error: 'RTC' was not declared in this scope
      setSyncProvider(RTC.get);
                      ^
    sketch/OpenSprinklerMain.cpp: In function 'void perform_ntp_sync()':
    OpenSprinklerMain.cpp:1521: error: 'RTC' was not declared in this scope
                 RTC.set ( t );
                 ^
    'DS1307RTC' does not name a type

    19. Time.h – Undo Previsous Edit (step 1, 8 & 15), and using Time 1.5.0 from Michael Margolis in Arduino Library Manager, then Restart Arduino IDE.

    /home/sukanime/Arduino/libraries/DS1307RTC-1.4/DS1307RTC.h:9:18: fatal error: Time.h: No such file or directory
     #include <Time.h>

    20. PCF8574Mio – Delete PCF8574Mio – Copia.cpp and PCF8574Mio – Copia.h

    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)':
    sketch/PCF8574Mio - Copia.cpp:84:2: error: '_data' was not declared in this scope
      _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
      _data >>= n;
      ^
    sketch/PCF8574Mio - Copia.cpp: In member function 'void PCF8574::shiftLeft(uint8_t)':
    sketch/PCF8574Mio - Copia.cpp:100:2: error: '_data' was not declared in this scope
      _data <<= n;

    21. SPIFFSdFat.h – Delete SPIFFSdFat.h and SPIFFSdFat.cpp

    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){}
           ^
    exit status 1
    'uint8_t' has not been declared

    22. LiquidCrystal Library – Change to version 1.2.1 – https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/LiquidCrystal_V1.2.1.zip

    In file included from /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:35:0:
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp: In member function 'uint8_t LiquidCrystal_SR1W::clearSR()':
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:77:24: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
      SR1W_ATOMIC_WRITE_LOW(srRegister, srMask);
                            ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.h:293:79: note: in definition of macro 'SR1W_ATOMIC_WRITE_LOW'
     #define SR1W_ATOMIC_WRITE_LOW(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg &= ~mask; }
                                                                                   ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:86:22: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
       fio_bit reg_val = *srRegister;
                          ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:95:5: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
        *srRegister = bit_high;
         ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:96:5: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
        *srRegister = bit_low;
         ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:101:4: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
       *srRegister = bit_high;
        ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp: In member function 'uint8_t LiquidCrystal_SR1W::loadSR(uint8_t)':
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:139:24: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
         fio_bit reg_val = *srRegister;
                            ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:144:6: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
         *srRegister = bit_low;
          ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:145:6: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
         *srRegister = bit_high;
          ^
    In file included from /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:35:0:
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:151:26: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
        SR1W_ATOMIC_WRITE_LOW(srRegister, srMask);
                              ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.h:293:79: note: in definition of macro 'SR1W_ATOMIC_WRITE_LOW'
     #define SR1W_ATOMIC_WRITE_LOW(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg &= ~mask; }
                                                                                   ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.cpp:158:27: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')
        SR1W_ATOMIC_WRITE_HIGH(srRegister, srMask);
                               ^
    /home/sukanime/Arduino/libraries/NewliquidCrystal/LiquidCrystal_SR1W.h:294:80: note: in definition of macro 'SR1W_ATOMIC_WRITE_HIGH'
     #define SR1W_ATOMIC_WRITE_HIGH(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg |= mask; }
                                                                                    ^
    exit status 1
    #48141

    TeguhTeknisi
    Participant

    And i the end, it failed to compile.

    I Attach the Last Error Log file.

    Please help…., i would like to have all the library to compile it.
    Please upload it to Github.
    If you have see ESP Easy, they give all the library for the Arduino, here the link https://github.com/letscontrolit/ESPEasy/tree/mega/lib
    i hope you can provide the library too.

    Best Regrads,

    Teguh.

    Attachments:
    #48143

    pbecchi
    Participant

    Sorry but we should restart from the beginning……. You have far to many errors and a lot of people compiled successfully with no or little problems!
    Have a look to previous post and see what other has done to compile!

    First GitHub contain to many directories and file that are useless ,so extract and compile OpenSprinkler 2.1.6 directory with only the subdirectories that contain the libraries you may need.
    Second define the configuration of your HW , the Esp pins you want to use and pins.h defines ( use comments and other prototype examples).
    If you want to send me your HW schematics I can do your pins.h proto configuration for you!

    If those steps are done correctly you should compile with no errors !

    #48150

    TeguhTeknisi
    Participant

    Thanks for the reply.

    I’am newbie, As far i know, the problem is related to the library.
    secomd because i try to compile using Arduino IDE under Linux and you using windows.

    i have been using google to solve the problem, and this point out to this forum and on esp8266 forum ( http://www.esp8266.com/viewtopic.php?f=32&t=8944 )
    but i still don’t understand.

    i try to compile using this https://github.com/pbecchi/OpenESP8266_Sprinkler/tree/ForOS_Bee2_0%2COS_Solar%2COS_3_0/OpenSprinkler_Arduino_V_2_1_6/
    and of course, i only move the Folder OpenSprinkler_Arduino_V_2_1_6 to ~/Arduino/ and rename it to OpenSprinkler__V_2_1_6
    just as i tell you before.
    i attach the screenshot about it.

    I will use this schematic https://github.com/n0bel/ESPrinkler2/blob/master/ESPrinkler2_schem.jpg , it use OLED, DS1307 and 74HC595
    but i will using Relay Module like this http://cdn.shopify.com/s/files/1/1978/9859/products/03_63_grande.jpg and connect it to 74HC595
    and for the button, i will use WeMos D1 Mini Pin D3 (GPIO 0), D4 (GPIO 2) and D6 (GPIO 12)

    I hope you could help me.

    Best Regrads,
    Teguh.

    #48154

    pbecchi
    Participant

    This is a pins.h section for your HW schematic :

    #elif PROTO==13 //ADD NEW N. for your prototype
    #define SDA_PIN gpio
    #define SCL_PIN gpio
    #define SHIFT_REG

    #define PIN_SR_LATCH gpio // shift register latch pin
    #define PIN_SR_DATA gpio // shift register data pin
    #define PIN_SR_CLOCK gpio // shift register clock pin
    #define PIN_SR_OE GPio // shift register output enable pin
    #undef OPENSPRINKLER_ARDUINO_DISCRETE
    #define SPIFFSDFAT
    #define EEPROM_ESP
    #define PIN_BUTTON_1 gpio
    #define PIN_BUTTON_2 gpio
    #define PIN_BUTTON_3 gpio

    #define STA_HIGH LOW // low station output on for Relay
    #define STA_LOW HIGH // high station output off for Relay

    // OLED 128*64 DISPLAY
    #define LCD_SSD1306
    #define LCD_RST gpio // LCD rst pin
    #define LCD_ADDR 0x3c. // LCD address

    You have to insert appropriate GPio n. and add this section to pins.h …don’t change any other define!

    #48159

    TeguhTeknisi
    Participant

    Thanks for the reply,

    in previous reply, you said, i don’t need sdfat library -> https://opensprinkler.com/forums/topic/opensprinkler-on-esp8266/page/7/#post-48124
    why in the pin.h above, it have sdfat library ?

    Why OE is connected to GPIO ? If i read this https://www.arduino.cc/en/Tutorial/ShiftOut and In this schema -> https://github.com/n0bel/ESPrinkler2/blob/master/ESPrinkler2_schem.jpg , the OE is grounded.

    Why i have to give LCD_RST Gpio ?
    There is no more GPIO to Assign for LCD_RST

    Is this right?

    #elif PROTO==13 //ADD NEW N. for your prototype
    #define SDA_PIN 4 // Wemos Mini Pin D2
    #define SCL_PIN 5 // Wemos Mini Pin D1
    #define SHIFT_REG
    
    #define PIN_SR_LATCH 15 // shift register latch pin , Wemos Mini Pin D8
    #define PIN_SR_DATA 13 // shift register data pin , Wemos Mini Pin D7
    #define PIN_SR_CLOCK 14 // shift register clock pin , Wemos Mini Pin D5
    #define PIN_SR_OE 12 // shift register output enable pin , Wemos Mini Pin D6
    #undef OPENSPRINKLER_ARDUINO_DISCRETE
    #define SPIFFSDFAT
    #define EEPROM_ESP
    #define PIN_BUTTON_1 0 // Wemos Mini Pin D3
    #define PIN_BUTTON_2 2 // Wemos Mini Pin D4
    #define PIN_BUTTON_3 16 // Wemos Mini Pin D0
    
    #define STA_HIGH LOW // low station output on for Relay
    #define STA_LOW HIGH // high station output off for Relay
    
    // OLED 128*64 DISPLAY
    #define LCD_SSD1306
    #define LCD_RST gpio // LCD rst pin
    #define LCD_ADDR 0x3c. // LCD address

    What about the library i ask you?
    Can you give the library?

    in file EtherCardW5100.h , itt ask #include <Arduino-Ping-master\ESP8266ping.h> , this Windows things…. Linux will be like this #include <Arduino-Ping-master/ESP8266ping.h>
    Where i can get it??

    LiquidCrystal library, what version and where you get it?

    And the last, to compile, i have to re download the github and have to do all i have write in here https://opensprinkler.com/forums/topic/opensprinkler-on-esp8266/page/8/#post-48136

    or just continue from the last time i try to compile it?

    i have try to compile with pin.h like above,
    and i got this error:

    In file included from sketch/EtherCardW5100.cpp:36:0:
    OpenSprinkler.h:262: error: 'LiquidCristal' does not name a type
     static LiquidCristal lcd;
            ^
    exit status 1
    'LiquidCristal' does not name a type

    i use LiquidCristal Library v1.2.1 from Francisco Malpartida

    I’am sory if i have alot to ask, but you github is hard to compile under Arduino IDE and Linux.
    Perhaps, the othet person that have succes compile it, using MS Visual Basic just like you did.

    Best Regrads,
    Teguh.

    Attachments:
    #48163

    pbecchi
    Participant

    For unused pins pin_sr_oe lcd_rst you should use a dummy pin n. (a,free pin ).
    You can find indication on where to find libraries in Readme or in previous posts.
    Regarding LiquidCristal and FatLib libraries:
    all your define are correct?
    Then you should not use those!

    May be you better restart from scratch!

    #48165

    TeguhTeknisi
    Participant

    Thanks for the reply.

    I have been read the readme in here https://github.com/pbecchi/OpenESP8266_Sprinkler/tree/ForOS_Bee2_0%2COS_Solar%2COS_3_0,
    but this link https://github.com/Dave1001/OpenSprinkler-Arduino/tree/master/Controller_W5100_V_2_0_7/libraries not exist anymore.
    that why i ask you in every reply.

    And in the readme doesn’t have #include <Arduino-Ping-master\ESP8266ping.h> and LiquidCrystal_I2C.h ( needed in penSprinkler.h line 55 )
    I have re read this topic from page 1 to 6, and i dont find the post that mentioned where i should get the library.

    What i found out, there is user @fivos that using this LiquidCrystal v1.2.1 library https://opensprinkler.com/forums/topic/opensprinkler-on-esp8266/page/2/#post-41825 ,
    but when i use that library to compile, i got the same error.
    Here i write the error again:
    In file included from sketch/EtherCardW5100.cpp:36:0:

    OpenSprinkler.h:262: error: 'LiquidCristal' does not name a type
     static LiquidCristal lcd;
            ^
    exit status 1
    'LiquidCristal' does not name a type

    The defines should be correct, i attach the pin.h so you can read it.

    Btw, i will give up for now.
    I will wait until you clean up the file in github, give a proper readme file.
    I still want to use 74HC595, so i will waiting.

    Thanks for your time.

    I will take my time to mod https://github.com/OpenSprinkler/OpenSprinkler-Firmware
    to make the Button B1, B2, and B3 using GPIO Pin on WeMos D1 Mini,
    I will try to disable Buzzer, and Disable RF TX and RF RX and use it for Button Pin.
    I Will be glad if can give sugestion about how to disable it, i have try edit define.h and assign to another pin, but failed.

    Best Regrads,
    Teguh.

    Attachments:
    #48167

    pbecchi
    Participant

    Have a look to first message on page 7!
    The statement the give the error in OpenSprinkler.h is under #ifdef and should not be executed if you define LCD_SSD1306!

    #48168

    TeguhTeknisi
    Participant

    Thanks for the reply,

    The first post is from @ja.charer , using https://github.com/dancol90/ESP8266Ping
    And i have said https://github.com/dancol90/ESP8266Ping in my post in page 8 first message, i use it too.
    it will be glad, if you willing to read my reply.
    but it seem you’re to busy.

    i’am sory, i’am not touching OpenSprinkler.h, because you said only change pin.h
    and i already upload my pin.h, you can see, i only do what you have said.

    Never mind, i already give up.
    have a nice day.

    i have modified the pin button to using gpio in https://github.com/OpenSprinkler/OpenSprinkler-Firmware .
    so i will continue to play with it.

    Best regrads,
    Teguh.

    #50203

    Daijoubu
    Participant

    I’m surprised this topic hasn’t gotten any activities since last year but after reading through a couple thousand line changes of code between release 217 and current master of Ray’s code…it just occured to me that the ESP8266 merge (for OS3.0) is not the same code as pbecchi’s mod?

    Would it be advisable to use OS3.0 code to run a custom ESP8266 or should I stick to pbecchi’s? I’m a web programmer and I can find my way through C.
    I’m planning to just use 2-3 GPIOS per zone to drive a H-bridge for a DC latching valve (Orbit 91592)
    Would a L298N provide enough current if I parallel the outputs for 4A max? Voltage drop is quite high however, specs list 4.9V @ 2A (!).
    The RobotDyn L298 board have extra transistors and I can drive it with 2 GPIOS only, otherwise I do have a board with mofsets that can handle up to 7A (“XY-160D” red, some green, replaced the 1000uF cap with a 2200uF) but that board needs 3 GPIOS per H-bridge, so a total of 6 for 2 zones.

    Btw, in order to use GPIO 9 and 10 (SD D2/D3, possibly different GPIO depending on the board), they must not be connected to the flash, so the pins will either have to be lifted or the trace cut off then pulled to VCC. And then flash with DIO mode using ESP Flash Download Tool, speed difference is minimal if you bump the SPI speed from 40 to 80Mhz

    I guess I’ll modify my board once I receive the 4MB/64Mb flash chips, would 1MB/8Mb be sufficient however?
    Perhaps not enough for OTA update? How big is the compiled code?
    I may be able to get away with using GPIO 0, 2, 12, 13, 14, 15 (16 has no INT_PULLUP/OPEN_DRAIN since it has a builtin pulldown for the wake from sleep)

    That leaves me with no GPIOs for buttons, I do have some expanders on order to play with.
    It would be nice to get a rotary encoder working 🙂

    My LCD is also a SH1106 1.3″ (SSD1306 is 0.96″) and it has a 132×64 framebuffer so the library has to take that into account and shift the image 2 pixels down.

    #50206

    os061217
    Participant

    That’s a lot of questions. I will give my input on the 1st. I had success with both code sets but the 3.0 code has other fixes that you will probably want.

    #50212

    pbecchi
    Participant

    I am working now (since 10 month) on Esp32 version with a lot of 3.0 features.
    It may be a good solution if you take an Esp32 with builtin graphic Oled lcd since they have a lot of Gpios available.
    To drive a latching solenoid I use 2 DPDT signal relay rated 2 AMPS avoiding this way any voltage drop. You must take care of all possible voltage reduction sources and in paticular of the length of wires connecting to the solenoids.
    Regarding Esp flash size, i recommend at least 4 GBytes.

    #50242

    Daijoubu
    Participant

    I’ve modded by ESP8266-Pro module from RobotDyn, lifted the flash chip’s PIN 3 and 7 and connected them to VCC, previously already flashed in DIO mode using ESP Flash Download tool.

    Was able to use GPIO 9 and 10 to blink LEDs no problem, so 9 GPIOs free if I keep UART and I2C

    I had some troubles with the inrush current of the 2000uF capacitor charging, was initially using a 2A boost converter module with a small SOT23 MT3608 IC but its built-in soft start wasn’t that great and the 5V USB power adapter goes into over current protection for a couple of secs until it’s charged up.

    I then switched to a common XL6009 based QSKJ 4A boost converter and that one seems to far better (also have an ENable pin broken out if I have enough GPIOs to make use of it)

    Also, if I don’t disconnect the boost converter’s output after charging up the cap and try to switch on the valve, it will keep sinking lots of current and you see the LEDs dim, had I have the ESP8266 connected for that test, no doubt it will reset.

    So either have a separate PSU for the ESP8266 and a beefy 24V PSU just for the valves (of which I do have a spare one) or find some sort of way to limit the in-rush current as well as to disconnect the boost converter, using a MOSFET perhaps?

    As for the L298, with its output paralleled, I was able to switch on/off the valve at 24V/2000uF during my test.

    #50246

    pbecchi
    Participant

    I really think that , to make sense, the latching solenoids should be operated on batteries.
    Otherwise the additional cost , complexity and the lower reliability versus 24v Ac it is not justifiable.
    In my case using Lipo batteries the charging current is not a problem and there is also the simple and cheap solution to use a 9v or 12v batteries for the solenoid and a separate one for the Esp.

    #50295

    Daijoubu
    Participant

    I already bought 2 of these Orbit DC latching valves and I do like that they require no power to stay on.

    The valve control is working fine now, I used a 2 channel relay board I had laying around as high side switches at the input and output of the boost converter, I can open the close the valve just fine with 20V and 2000uF, the valve sees about 18V.

    Been shopping for MOSFETs, all logic level 3.3V TO-220 are expensive at $3-4 a pop, may end up using an N-channel AO3404/IRLML0030TRPbF or P-channel AO3407, pretty cheap on eBay ($3-4/100pcs) and relatively inexpensive even at Digikey at $5-6/10.

    Since I have no experience with them, perhaps I’ll get the cheaper SOT23 to play with and if I fry them, no harm done 🙂

    #50331

    pbecchi
    Participant

    Sorry but I am not the guy that can help you on your h bridge electronic design.
    All my circuit are very simple and basic.
    Regarding voltage for latching solenoid operations, in my experience 12v constant are more than enough to operate most of the valve’s, but this is true because I use a battery.
    If you use a capacitor the voltage will drop immediately when you open your circuit….
    So you need to start well above 12v.
    If you want you can find in the market signal relay that can be connected to a Esp gpio for about 1$ each, I think is the simplest and cheaper solution!

    #50549

    alexelite
    Participant

    Hello all,

    First I want to thank everyone involved in this great project.

    I compiled firmware 2.1.7 and 2.1.8 on Arduino IDE 1.8.5, for a breadboard setup, but wifi connectivity did not work properly. The AP was visible but I could not connect to it. After using the test mode found in 2.1.8, things did not improve. Long story short, after a few days tinkering with the code I managed to pinpoint the problem to the function “ui_state_machine()”. Commenting it solved the problem, wifi working in ap mode and in station mode. Digging even deeper i thing the problem is somewhere in PCF8574 functions. When reading the buttons state the sketch loops to long without a delay() or a yield() and the network processes don’t get called.
    This is pretty weird considering there are almost no external libs and the code is what Ray and everyone else uses, and works.
    Moving the buttons on ESP8266 GPIOs fixes the issue. I tried esp8266 core 2.4.0 and 2.4.1, no change.

    Did anybody encounter this behavior? Could my PCF8574 be defective?

Viewing 25 posts - 101 through 125 (of 172 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Comments, Suggestions, Requests Opensprinkler on ESP8266