M5ez, a complete interface builder system for the M5Stack as an Arduino library. Extremely easy to use.



  • @crazyhorse80
    What demo are you trying and what errors because im running 2.0
    (sorry @Rop I forgot to update :P )



  • @crazyhorse80 Yes, as mentioned by @ajb2k3 it would be quite helpful to know which example program and which errors.



  • @rop
    The sketch I'm trying to load is M5ez-demo from examples\M5ez in Arduino IDE v1.8.7. I have ezTime v0.7.6 and M5ez v2.0.1 installed and I get a whole lot of errors when compiling.

    Arduino:1.8.7 (Windows 10), Scheda:"M5Stack-Core-ESP32, QIO, 80MHz, Minimal SPIFFS (Large APPS with OTA), 115200, Warn"
    
    ...
    
    Compiling library "M5ez"
    "C:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/config" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/bluedroid" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/bluedroid/api" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/app_trace" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/app_update" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/bootloader_support" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/bt" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/driver" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/esp32" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/esp_adc_cal" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/esp_http_client" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/esp_https_ota" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/esp-mqtt" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/esp-tls" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/ethernet" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/fatfs" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/freertos" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/heap" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/http_server" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/jsmn" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/log" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/mdns" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/mbedtls" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/mbedtls_port" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/newlib" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/nvs_flash" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/openssl" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/spi_flash" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/sdmmc" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/smartconfig_ack" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/spiffs" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/tcpip_adapter" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/tcp_transport" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/ulp" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/vfs" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/wear_levelling" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/xtensa-debug-module" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/lwip" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/coap" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/console" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/expat" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/json" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/newlib" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/nghttp" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/soc" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32/tools/sdk/include/wpa_supplicant" -std=gnu++11 -fno-exceptions -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -c -DF_CPU=240000000L -DARDUINO=10807 -DARDUINO_M5Stack_Core_ESP32 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"M5Stack_Core_ESP32\"" "-DARDUINO_VARIANT=\"m5stack_core_esp32\"" -DESP32 -DCORE_DEBUG_LEVEL=2 "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\cores\\esp32" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\variants\\m5stack_core_esp32" "-IC:\\arduino-1.8.7\\portable\\sketchbook\\libraries\\M5ez\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\WiFi\\src" "-IC:\\arduino-1.8.7\\portable\\sketchbook\\libraries\\M5Stack\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\Wire\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\SPI\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\FS\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\SD\\src" "-IC:\\arduino-1.8.7\\portable\\sketchbook\\libraries\\ezTime\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\SPIFFS\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\Preferences\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\WiFiClientSecure\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\Update\\src" "-IC:\\arduino-1.8.7\\hardware\\espressif\\esp32\\libraries\\EEPROM" "C:\\arduino-1.8.7\\portable\\sketchbook\\libraries\\M5ez\\src\\M5ez.cpp" -o "C:\\Users\\Utente\\AppData\\Local\\Temp\\arduino_build_297972\\libraries\\M5ez\\M5ez.cpp.o"
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In member function 'virtual size_t ezCanvas::write(uint8_t)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:329:1: error: no return statement in function returning non-void [-Werror=return-type]
    
     }
    
     ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In member function 'virtual size_t ezCanvas::write(const char*)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:334:1: error: no return statement in function returning non-void [-Werror=return-type]
    
     }
    
     ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In member function 'virtual size_t ezCanvas::write(const uint8_t*, size_t)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:341:1: error: no return statement in function returning non-void [-Werror=return-type]
    
     }
    
     ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In static member function 'static bool ezWifi::_autoconnectSelected(ezMenu*)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1248:2: error: no return statement in function returning non-void [-Werror=return-type]
    
      }
    
      ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In static member function 'static bool ezWifi::_connection(ezMenu*)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_WIFI_READY' not handled in switch [-Werror=switch]
    
            switch(_WPS_event) {
    
                  ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_SCAN_DONE' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_STA_START' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_STA_STOP' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_STA_CONNECTED' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_STA_DISCONNECTED' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_STA_AUTHMODE_CHANGE' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_STA_GOT_IP' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_STA_LOST_IP' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_AP_START' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_AP_STOP' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_AP_STACONNECTED' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_AP_STADISCONNECTED' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_AP_STAIPASSIGNED' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_AP_PROBEREQRECVED' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_GOT_IP6' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_ETH_START' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_ETH_STOP' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_ETH_CONNECTED' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_ETH_DISCONNECTED' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_ETH_GOT_IP' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1382:14: error: enumeration value 'SYSTEM_EVENT_MAX' not handled in switch [-Werror=switch]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In static member function 'static uint16_t ezWifi::loop()':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1450:9: error: enumeration value 'EZWIFI_NOT_INIT' not handled in switch [-Werror=switch]
    
       switch(_state) {
    
             ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: At global scope:
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1779:2: warning: unknown escape sequence: '\|'
    
      "KB14|!?:;\\#$^&#SP#KB15|*()_-+=\|#Del#KB0|More#LCK:SYM|Lock#KB16|'\"`@%\\/#KB17|<>{}[]()#Done", //KB13
    
      ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1782:2: warning: unknown escape sequence: '\#'
    
      "'#\"#`#@#%#/#\##Back",                //KB16
    
      ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In static member function 'static String M5ez::msgBox(String, String, String, bool, const GFXfont*, uint16_t)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1805:10: warning: unused variable 'prev_num_lines' [-Wunused-variable]
    
      uint8_t prev_num_lines = 100;
    
              ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In member function 'bool ezMenu::addItem(String, void (*)(), bool (*)(ezMenu*))':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:2314:1: error: no return statement in function returning non-void [-Werror=return-type]
    
     }
    
     ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In member function 'void ezMenu::_drawItem(int16_t, String, bool)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:2488:10: warning: unused variable 'font_h' [-Wunused-variable]
    
      int16_t font_h = ez.fontHeight();
    
              ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In member function 'int16_t ezMenu::_runImagesOnce()':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:2542:11: warning: unused variable 'old_selected' [-Wunused-variable]
    
       int16_t old_selected = _selected;
    
               ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In constructor 'ezProgressBar::ezProgressBar(String, String, String, const GFXfont*, uint16_t, uint16_t)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:2715:10: warning: unused variable 'prev_num_lines' [-Wunused-variable]
    
      uint8_t prev_num_lines = 100;
    
              ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In member function 'bool ezMenu::setCaption(int16_t, String)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:2362:1: error: control reaches end of non-void function [-Werror=return-type]
    
     }
    
     ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In member function 'void ezMenu::_drawCaption()':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:2643:19: error: 'y' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
      m5.lcd.drawString(caption, x, y);
    
                       ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In static member function 'static void ezButtons::_drawButton(int16_t, String, String, int16_t, int16_t)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:574:23: error: 'bg_color' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
       m5.lcd.fillRoundRect(x, y, w, ez.theme->button_height, ez.theme->button_radius, bg_color);
    
                           ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:574:23: error: 'y' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In static member function 'static void ezWifi::_drawWidget(uint16_t, uint16_t)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1121:166: error: 'bars' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
        m5.lcd.fillRect(left_offset + n * (ez.theme->signal_bar_width + ez.theme->signal_bar_gap), top + max_len - this_len, ez.theme->signal_bar_width, this_len, (n + 1 <= bars ? ez.theme->header_fgcolor : ez.theme->header_bgcolor) );
    
                                                                                                                                                                          ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp: In static member function 'static String M5ez::textBox(String, String, bool, String, const GFXfont*, uint16_t)':
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1975:58: error: 'cursor_y' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
        if (!readonly && cursor_x && cursor_y) m5.lcd.fillRect(cursor_x, cursor_y, cursor_width, cursor_height, ez.screen.background());  //Remove current cursor
    
                                                              ^
    
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\src\M5ez.cpp:1975:18: error: 'cursor_x' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
        if (!readonly && cursor_x && cursor_y) m5.lcd.fillRect(cursor_x, cursor_y, cursor_width, cursor_height, ez.screen.background());  //Remove current cursor
    
                      ^
    
    cc1plus.exe: some warnings being treated as errors
    
    Più di una libreria trovata per "WiFi.h"
    Usata: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\WiFi
    Non usata: C:\arduino-1.8.7\libraries\WiFi
    Più di una libreria trovata per "SD.h"
    Usata: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\SD
    Non usata: C:\arduino-1.8.7\libraries\SD
    Uso la libreria M5ez alla versione 2.0.1 nella cartella: C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez 
    Uso la libreria WiFi alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\WiFi 
    Uso la libreria M5Stack alla versione 0.2.2 nella cartella: C:\arduino-1.8.7\portable\sketchbook\libraries\M5Stack 
    Uso la libreria Wire alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\Wire 
    Uso la libreria SPI alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\SPI 
    Uso la libreria FS alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\FS 
    Uso la libreria SD alla versione 1.0.5 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\SD 
    Uso la libreria ezTime alla versione 0.7.6 nella cartella: C:\arduino-1.8.7\portable\sketchbook\libraries\ezTime 
    Uso la libreria SPIFFS alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\SPIFFS 
    Uso la libreria Preferences alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\Preferences 
    Uso la libreria WiFiClientSecure alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\WiFiClientSecure 
    Uso la libreria Update alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\Update 
    Uso la libreria EEPROM alla versione 1.0 nella cartella: C:\arduino-1.8.7\hardware\espressif\esp32\libraries\EEPROM 
    exit status 1
    Errore durante la compilazione per la scheda M5Stack-Core-ESP32.
    


  • I can load other M5Stack examples but not those in the M5ez directory. Any idea? Thanks in advance!
    PS: Please forgive my bad English but I'm from Italy...



  • I think ( but i am a noob) that the location of your libraries are not right.

    Got multiple versions of the arduino ide installed ?

    C:\arduino-1.8.7\libraries\WiFi
    C:\arduino-1.8.7\hardware\espressif\esp32\libraries\WiFi
    C:\arduino-1.8.7\portable\sketchbook\libraries\M5ez\

    My best guess is to clean up other versions..... or update all versions on your system to m5ez 2.01



  • @crazyhorse80 Please don't apologise for being Italian, it happens in the best families :)

    The interesting thing is that some of these compiler warnings/errors are real. Sometimes a non-void function indeed returned nothing, some of the other errors are rather nitpicky. Thing is that my IDE never cared about these things: I had "Arduino / Preferences / Compiler Warnings" set to "Default". You must have it set higher. Naturally all of these errors need to be fixed in my code, and I will do so over the next few days and release 1.0.2. Until then, simply set "Compiler Warnings" to "None" and all will be good...

    (I have no idea what your undoubtably Italian version of the IDE calls "Arduino / Preferences / Compiler Warnings", but you'll figure it out...)

    Sorry for the inconvenience, my bad...



  • Thank you all for your replies. I have multiple versions of the Arduino IDE installed but they're all portable installations and they all run fine.
    I will change compiler configuration as suggested and I 'll let you know how it' ll do.
    PS: nice joke ;)



  • Setting compiler warnings to none made it load and execute. Thank you! I hope you can fix it soon 'cause I think it'll be the base for all my M5Stack sketches! ;)

    EDIT: The only thing I can't get working is OTA update... It stops at around 212kB for timeout every time, even near to the router. Is it supposed to actually work?

    EDIT 2: Are you planning to support multi language interface in near future? I think it would be great to have a simple way to change language something like themes, wouldn't it be?



  • @crazyhorse80 Good that it works now...

    OTA: The underlying "Upgrade.h" library is not very robust: it gives up too easily. I am planning to use functions from it but replicate the main loop in my own code and give it longer timeouts. Strange that it's at the same number of bytes though: I have it giving up at random points sometimes, more often when further from access point. But then some days it works fine.

    Multi-language: Depending on how it's done can make the code quite a bit bigger, and ayt a minimum needs printf statements with the variables as arguments to make up for different grammar structures. So that's quite a bit of work to stick in, but I'll place it on my list of possible features. (No clue how to do Mandarin or Right-To-Left languages or anything like that though. That will at least also involve providing the fonts, if Adafruit's gfx library even does things like that.



  • @rop: awesome project ;-)

    Question : how can I preconfigure wifi settings (ssid, pass) for my application on m5 without playing with ez.wifi.menu ??



  • @macle Depends on what you need. Are you mass-programming a bunch of devices? The easiest way is probably to add a bit of code to your program that does this. Haven't tested, but something like this should work:

    void setup() {
      ez.begin();
      [...]
      if (ez.wifi.indexForSSID("your-ssid") == -1) {
        ez.wifi.add("your-ssid", "your-key");
        ez.wifi.writeFlash();
      }
      [...]
    }
    

    (It's all here in the manual.)



  • @rop
    That should be
    ez.wifi.indexForSSID("your-ssid")
    ;)

    Can I ask if someone has already integrated a simple web server with your software? Could you point me to some easy example? Thank you!
    Basically I have an Arduino board sending GET requests to my M5Stack address and I need to decode the GET string and display some variable value on screen every time I got a new connection.



  • @crazyhorse80M5ez, a complete interface builder system for the M5Stack as an Arduino library. Extremely easy to use. 中说:

    @rop
    That should be
    ez.wifi.indexForSSID("your-ssid")
    ;)

    Whoops, so right... Fixed.

     

    Can I ask if someone has already integrated a simple web server with your software? Could you point me to some easy example? Thank you!
    Basically I have an Arduino board sending GET requests to my M5Stack address and I need to decode the GET string and display some variable value on screen every time I got a new connection.

    I haven't done this, but the new ez.addEvent feature (manual) allows you to put any code you want in the idle loop of M5ez. For example, if you were to use the WebServer library from Espressif, you would create a function that runs as part of the M5ez main loop, and from it call that library's server.handleClient() (you can't do that directly because the M5ez event functions must return a uint16_t number to indicate after how many ms they would like to be ran again.)



  • Thak you! I'll have a look at that.



  • @Rop Hi! Could you consider some changes requests to M5ez?

    • I have some problem with Geo-IP timezone auto-select, it always timeouts and it's only executed once: could you, please, modify this function to retry if timeout occurs?

    • Could you make the actual header to be a "system" header (with title, WiFi and clock widgets) and add a "user" header so the user could put more widgets in it? I ask for this one 'cause I'm planning an app that will require to display few widgets and I have no pixels to show them all. (In case you're not planning to do that, I'll simply add my code to be displayed in the canvas space with a function of my own).

    • And now a more personal request: could you please make a dummy widget complete with all the code to associate a settings menu (with enable / disable widget setting) and the draw code. It'll be perfect if it will simply display a variable value and update every time the minute changes. I've tried to modify the clock widget but I didn't have success with that.

    Thank you in advance!



  • @crazyhorse80

    I have some problem with Geo-IP timezone auto-select, it always timeouts and it's only executed once: could you, please, modify this function to retry if timeout occurs?

    Do you also have problems if you lookup the timezone from code (like with MyTZ.setlocation("Europe/Amsterdam")? Retries (and periodic refreshes) of timezone data are planned.

     

    Could you make the actual header to be a "system" header (with title, WiFi and clock widgets) and add a "user" header so the user could put more widgets in it? I ask for this one 'cause I'm planning an app that will require to display few widgets and I have no pixels to show them all. (In case you're not planning to do that, I'll simply add my code to be displayed in the canvas space with a function of my own).

    You could remove the header widgets and create new ones if you want to use the existing space on the display. Or you can write your own code to create your own header on the canvas either in place of or below the existing header. I do not plan to include a second header line.

     

    And now a more personal request: could you please make a dummy widget complete with all the code to associate a settings menu (with enable / disable widget setting) and the draw code. It'll be perfect if it will simply display a variable value and update every time the minute changes. I've tried to modify the clock widget but I didn't have success with that.

    I'm not sure I could do something that would be more informative than the clock code from M5ez.cpp. Let's walk through:

    • If the clock is set to be displayed, ezClock::restart() calculates the width of the widget (clock uses a fixed-width font) and does:
    ez.header.insert(RIGHTMOST, "clock", width, ez.clock.draw);
    
    • The draw routine that this points to simply clears the area and draws the text. Note that this gets x-position and width from the header code :
    void ezClock::draw(uint16_t x, uint16_t w) {
    	if (_starting) return;
    	m5.lcd.fillRect(x, 0, w, ez.theme->header_height, ez.theme->header_bgcolor);
    	ez.setFont(ez.theme->clock_font);
    	m5.lcd.setTextColor(ez.theme->header_fgcolor);
    	m5.lcd.setTextDatum(TL_DATUM);
    	m5.lcd.drawString(tz.dateTime(_datetime), x + ez.theme->header_hmargin, ez.theme->header_tmargin + 2);
    }
    
    • This redraw routine is automatically called by the header code every time the header is redrawn and additionally every minute — from ezClock::loop() — which simply says:
    if (_on && ezt::minuteChanged()) ez.header.draw("clock");
    
    • The clock header item can be removed with
    ez.header.remove("clock");`
    

     

    Hope this helps, otherwise you'll have to tell me what is not working for you, or (better yet) show code that you are trying to make work.



  • @ropM5ez, a complete interface builder system for the M5Stack as an Arduino library. Extremely easy to use. 中说:

    @crazyhorse80
    Do you also have problems if you lookup the timezone from code (like with MyTZ.setlocation("Europe/Amsterdam")?

    I tried to put this line MyTZ.setlocation("Europe/Rome") in my setup() function, but I get an error:

    error: 'MyTZ' was not declared in this scope
    

    I also tried to setup TZ in the clock menu at runtime but I can't find the / character on onscreen keyboard...

     
    I'm not sure I could do something that would be more informative than the clock code from M5ez.cpp. Let's walk through:

    [...]

    Hope this helps, otherwise you'll have to tell me what is not working for you, or (better yet) show code that you are trying to make work.

    I think I understood how the clock widget works, but I can't replicate it with my own widget code, here it is:
    this is on a tab of its own named Widgets:

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //
    //   B B A N D
    //
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    class ezBBand {
      public:
        static void begin();
        static void restart();
        static void menu();
        static uint16_t loop();
        static void clear();
        static void draw(uint16_t x, uint16_t w);
      private:
        static void _writePrefs();
        static bool _on;
        static bool _starting;
    };
    
      bool ezBBand::_on;
      bool ezBBand::_starting = true;
    
      void ezBBand::begin() {
        Preferences prefs;
        prefs.begin("M5ez", true);  // read-only
        _on = prefs.getBool("BBand_on", true);
        prefs.end();
        ez.settings.menuObj.addItem("BBand settings", ezBBand.menu);
        ez.addEvent(ezBBand.loop);
        ezBBand.restart();
      }
      
      void ezBBand::restart() {
        ez.header.remove("BBand");
        uint8_t length;
        if (_on) {
          length = 2;
          ez.setFont(ez.theme->clock_font);
          uint8_t width = length * m5.lcd.textWidth("F") + ez.theme->header_hmargin * 2;
          ez.header.insert(ez.header.position("title") + 2, "BBand", width, ezBBand.draw);
        }
      }
      
      void ezBBand::menu() {
        bool on_orig = _on;
        while(true) {
          ezMenu bbandmenu("BBand settings");
          bbandmenu.txtSmall();
          bbandmenu.buttons("up#Back#select##down#");
          bbandmenu.addItem("on|Display BBand\t" + (String)(_on ? "on" : "off"));
          if (_on) {
          }
          switch (bbandmenu.runOnce()) {
            case 1:
              _on = !_on;
              ezBBand.restart();
              break;
            case 0:
              if (_on != on_orig) {
                _writePrefs();
              }
              return;
          }
        }
      }
      
      uint16_t ezBBand::loop() {
        ezt::events();
        if (_starting && timeStatus() != timeNotSet) {
          _starting = false;
          ez.header.draw("BBand");
        } else {
          if (_on && ezt::minuteChanged()) ez.header.draw("BBand");
        }
        return 250;
      }
      
      void ezBBand::draw(uint16_t x, uint16_t w) {
        if (_starting) return;
        m5.lcd.fillRect(x, 0, w, ez.theme->header_height, ez.theme->header_bgcolor);
        ez.setFont(ez.theme->clock_font);
        m5.lcd.setTextColor(ez.theme->header_fgcolor);
        m5.lcd.setTextDatum(TL_DATUM);
        m5.lcd.drawString("Fx", x + ez.theme->header_hmargin, ez.theme->header_tmargin + 2);
      }
      
      void ezBBand::_writePrefs() {
        Preferences prefs;
        prefs.begin("M5ez");
        prefs.putBool("BBand_on", _on);
        prefs.end();
      }
    

    It should display the string Fx between WiFi and clock widgets (I'll modify that to display a string from a variable if I get it to work).
    In my main tab (M5remDisplay) I put this:
    ezBBand BBand; as a global variable declaration and BBand.begin(); in my setup() function.

    This is a list of errors I got:

    M5remDisplay:16:1: error: 'ezBBand' does not name a type
    
     ezBBand BBand;
    
     ^
    
    C:\Users\Utente\AppData\Local\Temp\arduino_modified_sketch_422641\M5remDisplay.ino: In function 'void setup()':
    
    M5remDisplay:58:3: error: 'BBand' was not declared in this scope
    
       BBand.begin();
    
       ^
    
    Z:\_PVControl\M5remDisplay\Widgets.ino: In static member function 'static void ezBBand::begin()':
    
    Widgets:30:58: error: expected primary-expression before '.' token
    
         ez.settings.menuObj.addItem("BBand settings", ezBBand.menu);
    
                                                              ^
    
    Widgets:31:24: error: expected primary-expression before '.' token
    
         ez.addEvent(ezBBand.loop);
    
                            ^
    
    Widgets:32:12: error: expected unqualified-id before '.' token
    
         ezBBand.restart();
    
                ^
    
    Z:\_PVControl\M5remDisplay\Widgets.ino: In static member function 'static void ezBBand::restart()':
    
    Widgets:42:80: error: expected primary-expression before '.' token
    
           ez.header.insert(ez.header.position("title") + 2, "BBand", width, ezBBand.draw);
    
                                                                                    ^
    
    Z:\_PVControl\M5remDisplay\Widgets.ino: In static member function 'static void ezBBand::menu()':
    
    Widgets:58:18: error: expected unqualified-id before '.' token
    
               ezBBand.restart();
    
                      ^
    

    Thank you for helping me and having so much patience...



  • @crazyhorse80

    I tried to put this line MyTZ.setlocation("Europe/Rome") in my setup() function, but I get an error:
    error: 'MyTZ' was not declared in this scope

    MyTZ has to be declared first. If you put Timezone MyTZ outside of any functions (in the "global scope") it should work.

    More generally: using objects from my libraries works because they are declared in the ezTime.h and M5ez.h files and then implemented in the respective .cpp files. I would stay away from creating your own objects at this point. You don't need them: simple functions within your own sketch would work and are easier to understand. Simply put the header.add in your setup() (after ez.begin()), and point to a regular void function that takes two uint16_t parameters for drawing the widget.

    (If you do want to use a class, you'll have to make it static, because otherwise you cannot point to the draw function. But really, just use a regular function.)



  • @rop I thought MyTZ object was already declared in your library, my fault.
    Thank you for your explanation about objects. I misunderstood your previous directions and I thought I must use them to the widget to work. It seems it was a lot easier to do than that! The widgets I need to display are really simple, just a small text or icon reflecting the state of some variable's value, so I think a regular function will work. I'll try one more time. ;)



  • @rop, M5ez is awesome - thank you for the enormous amount of time you put into it!

    I'm trying to use Blynk to receive events from another board. I have gotten events to show on the M5 in a simple standalone program, so I know it "works". Within M5ez, I believe I just need to call Blynk.run() with the ez.addEvent function, as Blynk.run needs to run often as possible - in most of my projects it's usually the only thing in the main loop, but I'm unsure of how/where to use the ez.addEvent function. There aren't any examples of ez.addEvent in the Demo or any of the other examples included with the library. Any help on syntax and where to put that statement?

    Thanks again for your time!!!