Welcome to MattzoBricks Forums Switches Firmware Upload Issues

Viewing 17 reply threads
  • Author
    Posts
    • #1757
      Matthias RunteMatthias Runte
      Keymaster
    • #1821
      Henk JansenHenk Jansen
      Participant

      Hi Matthias, I just bought my first ESP8266 board. I installed the Arduino software and I also downloaded your firmware and copied the library to the right location.

      I’m going to build a switch controller, but when i open the MattzoController_Switch.ino file with arduino and i try to upload it to te ESP8266 (wich is connected by USB) i get this alert:

      Arduino: 1.8.13 (Windows 10), Board:"Arduino Uno"
      
      MattzoController_Switch:10:10: fatal error: ESP8266WiFi.h: No such file or directory
      
       #include <ESP8266WiFi.h>                          // WiFi library for ESP-8266
      
                ^~~~~~~~~~~~~~~
      
      compilation terminated.
      
      exit status 1
      
      ESP8266WiFi.h: No such file or directory

      Can you send me on the right path?

    • #1822
      Henk JansenHenk Jansen
      Participant

      Oops, i forgot to select the right board in the settings.

      But now I get the warning that servo.h can’t be found at the right location. where do i find this one?

    • #1823
      Henk JansenHenk Jansen
      Participant

      I’m getting there in little steps 🙂 I installed the PubSubClient library. ut now I get another fault:

      Arduino: 1.8.13 (Windows 10), Board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
      
      Meerdere bibliotheken gevonden voor "Servo.h"
      
      In file included from C:\Users\henk\Documents\Arduino\MattzoController_Switch\MattzoController_Switch.ino:13:0:
      
      Gebruikt: C:\Users\henk\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\Servo
      
      C:\Users\henk\Documents\Arduino\libraries\MattzoBricks/MattzoController_Library.h:44:22: fatal error: tinyxml2.h: No such file or directory
      
      Niet gebruikt: C:\Program Files (x86)\Arduino\libraries\Servo
      
       #include <tinyxml2.h>
      
      compilation terminated.
      exit status 1
      
      
    • #1828
      Henk JansenHenk Jansen
      Participant

      I just found out all the info needed was inside the “MattzoController_Library.h”-file. I downloaded all the libraries (they’re not all of them searchable through the arduino software. Yoy need to download them from github).

    • #1829
      Thorsten SchmitzThorsten Schmitz
      Participant

      Hi Henk, you find everything you need in the general description or in the configuration and libraries Files for the different Controllers! But i think its point we should document more obvious! Thanks for writing your progress!

    • #1858
      Piet BeinekePiet Beineke
      Participant

      I’ve got a similar question as Henk, because my IDE tells me in the MTC4PF-Code that XML_Document, XML_Success etc. “are not declared in this scope”. Where are these located or are they also in a seperate library which has to be downloaded
      Regards
      Piet

    • #1859
      Thorsten SchmitzThorsten Schmitz
      Participant

      Hi Piet,
      check MattzoController_Library. May be you didn’t load tinyxml in your library. It#s mostly the reason for some problems. If not, please check all libraries have ther needed Parts. Check the general discription and the libraries for further informations!

      Thorsten

    • #1860
      Piet BeinekePiet Beineke
      Participant

      You were right, I did have got the #s still on the tinyxml2, but it still tells me that theres the same problem in “XMLDocument xmlDocument;” because it says it has not been declared, although I do have erything in playce as listed in the general description…
      Regards
      Piet

    • #1968
      Piet BeinekePiet Beineke
      Participant

      I have tried some different things, like searching for spelling mistakes I made or misplacement of the tinyxml2.h Document, but I just can’t seem to find the problem. Is there something required between “XMLDocument” and “xmlDocument” in the MTC4PF Document in line 251, where the message pops up? I have got the tinyxml2.h Document inside the tinyxml2-master folder inside the libraries folder, so everything is placed correctly and I don’t get why it does not work for me…
      Regards
      Piet

    • #1979
      Piet BeinekePiet Beineke
      Participant

      hat sich geklärt:)

    • #2156
      MichaelMichael
      Participant

      Hello everyone. I’m a really big fan of your idea and would like to start by congratulating you on this great website. I think the whole thing is super-genius and have already got myself the necessary electrical components. Unfortunately, however, I am failing at making a controller. In other words, I would like to start by simply making an MTC4PU… After I have integrated various libraries and also downloaded and linked the two Github projects, error messages still appear. What I would like to see is a step-by-step guide for people like me who get a little bit out of it, but apparently not enough 😀 . Did I miss that somewhere? in any case: THANK YOU!
      Regards – Michael

      • #2159
        Piet BeinekePiet Beineke
        Participant

        There isn’t really a “tutorial” anywhere by now, but that’s why the forum is there!
        It would be very helpful to know what your error message/s is/are that you get, so we know, where the problem could be.
        Regards

    • #2203
      Harald WiedemannHarald Wiedemann
      Participant

      Hi all,
      the first steps are done – I have bought all required material to set up some automation for my LEGO tracks.
      Now I need to upload the required firmware (MTC4PU) to the micro controller. And guess why I’m here now? Problems… 🙁
      I have followed all required steps following the “general section” and also the section for the “MTC4PU” on the website. During the “Verify”-process on Arduino IDE I have encountered already various issues in regards to missing libraries but I could solve all by myself.
      But now I’m kind of stucked with this error message:

        Multiple libraries were found for “WiFi.h”
        Used: /Users/hwiedemann/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi
        In file included from /Users/hwiedemann/Documents/_MattzoController/Firmware_MattzoController_V0/MTC4PU/MTC4PU.ino:64:0:
        Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
        /Users/hwiedemann/Documents/Arduino/libraries/MattzoBricks/MattzoController_Library.h:44:22: fatal error: tinyxml2.h: No such file or directory
        #include <tinyxml2.h>
        ^
        compilation terminated.
        exit status 1
        Error compiling for board NodeMCU-32S.

      It looks like that the file “tinyxmlz.h” is missing or cannot be found. But I have installed the library “TinyXML” on my system – so this should not be any problem.

      Anyone could help?

      Thanks in advance!
      Harald

      • #2204
        Piet BeinekePiet Beineke
        Participant

        Hi Harald,
        I have encountered this problem aswell and it is pretty easy to fix. When you search for the #include quotes in the “MattzoController_Library.h” file you will find the “#include <tinyxml2.h>” and the “using namespace tinyxml2;” quote in line 44,45. Simply ‘uncomment’ them by removing the // infront of them. That should do the trick.
        Regards
        Piet

        • #2207
          Piet BeinekePiet Beineke
          Participant

          I think your post got removed due to the link inbedded. So you can not find the tinyxml2.h/.cpp files in your arduino-library folder, is that correct?

          • #2208
            Harald WiedemannHarald Wiedemann
            Participant

            Yes, I have tried to insert a photo/screenshot… didn’t work…
            Anyway – thanks for your reply.
            I have checked your suggestion but this seems not to be the problem.

            And yes, I cannot find “tinyxml2.h” in the library – but there is “tinyxml.h”.

            is it the one which is required?

          • #2209
            Piet BeinekePiet Beineke
            Participant

            Just for confirmation, you did download the tinyxml2 files, that are required, because tinyxml (1) won’t work/ I know it works with tinyxml2, from this github site: github .com/ leethom ason/t inyxml2

          • #2210
            Harald WiedemannHarald Wiedemann
            Participant

            wow – now it gets really complicated for my non-existent electronic knowledge about microprocessors or Arduino. 🙁
            I have now found the “tinyxml2.h” file on this GitHub-website and could move it to the TinyXML-library. It seems to work.

            But now I have the next error-message:

            Multiple libraries were found for “WiFi.h”
            Used: /Users/hwiedemann/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi
            In file included from /Users/hwiedemann/Documents/_MattzoController/Firmware_MattzoController_V0/MTC4PU/MTC4PU.ino:64:0:
            Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
            /Users/hwiedemann/Documents/Arduino/libraries/MattzoBricks/MattzoController_Library.h:52:39: fatal error: Syslog.h: No such file or directory
            #include <Syslog.h> // Syslog library
            ^
            compilation terminated.
            exit status 1
            Error compiling for board NodeMCU-32S.

            Sorry to bother you with this…

          • #2211
            Piet BeinekePiet Beineke
            Participant

            No problem, I just hope I can help with this, because I’ve asked this forum many times myself. It seems like one of the problems is that you have selected the wrong board for compilation in Arduino-IDE. The right one would be “NodeMCU 1.0(ESP-12EModule)”. It should be available if you have installed the ESP-8266 “Board-pack”. If that doesn’t do the trick, I am sorry because I’m not an expert at all, I have just experimented a bit in the building-process…
            Regards
            Piet

          • #2212
            Harald WiedemannHarald Wiedemann
            Participant

            ok – this could be an issue as well. But at the moment I’m programming the microprocessor for the PoweredUp controller – it’s a ESP 32.
            But I have changed the board-setting according your suggestions now – and I still get the same error message (with the Syslog Library).
            This is all “Chinese” for me or a German would say “ich verstehe nur Bahnhof…” – I have really no experience with all this. But yes, I’m willing to learn!
            Maybe the big “master” Matthias will log in later on and has something to say about it. In the meanwhile I’m doing a break and come back in a few hours.

            Thanks for your help so far, Piet. Much appreciated!

    • #2213
      ZoltanZoltan
      Participant

      Hallo, erste Frage: Kann ich deutsch kommunizieren, oder ist Englisch erwünscht?

      Hi, first Quiestion: can I communicate in German in this forum, or is English preferred?

      As for my problem: I am not new to Rocrail, but an absolute greenhorn for Arduino/ESP and MQTT.

      I run Debian 10 Linux on my PC.
      Rocrail (current version) is installed and working.
      Mosquitto is installed.
      I have collected all required material to set up some automation for my LEGO project:
      – LEGO 60197 City Personenzug as the “victim”
      – AZDelivery ESP32 NodeMCU Module WLAN WiFi Dev Kit C Development Board mit CP2102 for MTC4PU
      – AZDelivery NodeMCU Lolin V3 Module ESP8266 ESP-12F WIFI Wifi Development Board mit CH340 for Switch and Sensors Controller
      – GPS-14 Reed Relay modules

      Now I need to upload the required firmware (MTC4PU) to the micro controller… but I have already a problem with choosing the right board in the Arduino IDE.

      Could you tell me, which board I have to choose for MTC4PU ESP32, and which one for Switc/Sensor Controller ESP8266?

      Thanks/Danke:

      Zoltan

      • #2214
        Piet BeinekePiet Beineke
        Participant

        Da ich nur MTC4PF gebaut habe, wenn es um Züge geht, kann ich bei dem MTC4PU nicht helfen, jedoch für alle anderen, ESP8266 basierten Controller(zb. Switch/Sensor), ist “NodeMCU 1.0(ESP-12EModule)” die richtige Option.
        Viele Grüße
        Piet

        • #2218
          ZoltanZoltan
          Participant

          Danke, Piet!
          Jetzt müsste ich noch die ESP Bord Variante finden.
          LG Zoltan

      • #2216
        Harald WiedemannHarald Wiedemann
        Participant

        Hi Zoltan,
        sieht so aus als “sitzen wir im gleichen Boot”…
        To your first question: Not sure about the language. Me personally I don’t mind writing in English and the advantage is definitely that you will reach more reader and probably more “colleagues” who are able to help you with your problem.
        Well, as said – looks like that we have the same setup and also our “problems” are similar: I´m also trying to upload the firmware for my MTC4PU with “ESP32 NodeMcu WiFi CP2102”. Till now I have used the “NodeMCU-32S” (see also my error messages above). I’ve experienced various errors already which I was able to solve partly but not completely. Maybe the problem lies in the board which I have chosen in Arduino – no clue.
        I hope to get an answer in this forum.

        Have fun!
        Harald

    • #2215
      ZoltanZoltan
      Participant

      Leider gibt es zu viele ESP32 Möglichkeiten – ich warte, bis einer den korrekten mir zeigt!

      • This reply was modified 3 years, 2 months ago by ZoltanZoltan.
      • #2237
        Raymond BrinkRay
        Keymaster

        Hi Zoltan,

        When using the AZDelivery ESP32 NodeMCU Module WLAN WiFi Dev Kit C you should select the ESP32 Dev Module under Tools\Boards\ESP32 Arduino in the Arduino IDE.

        Just tested it myself and was able to upload the firmware.

        Cheers!
        Ray

    • #2246
      ZoltanZoltan
      Participant

      Thanks Piet & Raymond, with those 2 Board settings I could compile MTC4PU on the ESP32 and both MattzoController_Sensor_Digital and MattzoController_Switch.
      With MTC4PF I had an error (L9110N), but I shall handle it in the corresponding thread.
      EDIT: I found a workaround (?), see there.

      • This reply was modified 3 years, 2 months ago by ZoltanZoltan.
    • #3300
      Dirk SchäferDirk Schäfer
      Participant

      Hallo,

      ich habe gestern in der ARDUINO IDE (v1.8.15) das Paket für den esp8266 von der Version 2.7.4 auf die Version 3.0.0 geupdated. Das Resultat war, dass beim Update der MattzoLayoutContoller folgender Fehler in einer ganzen Reihe von Zeilen auftrat:

      “call of overloaded ‘abs(unsigned int)’ is ambiguous”

      z.B. in Zeile 671:

      levelCrossing.servoAngleIncrementPerMS = (float)abs(LC_BOOM_BARRIER_ANGLE_PRIMARY_UP – LC_BOOM_BARRIER_ANGLE_PRIMARY_DOWN) / LC_BOOM_BARRIER_OPENING_PERIOD_MS;

      Der Fehler liegt wohl darin, dass die abs-Funktion mit “unsigned integer” nicht klar kommt und lieber int, float oder double hätte. Warum das erst bei Version 3.0.0 ein Thema ist, habe ich nicht ergründet. Da in der mattzo-Firmware die Variablen und Konstanten mehrfach direkt als “unsigned integer” und nicht als “integer” deklariert werden, und ich nicht weiß, warum, habe ich die Deklarationen so gelassen und bin für die esp8266 auf die Version 2.7.4 zurück. Jetzt funktioniert das Update der Firmware wieder. Never change a running system.

      Vielleicht hat der ein oder andere mal das gleiche Problem…

      VG
      Dirk

    • #3466
      Oscar WagnerOscar WAGNER
      Participant

      Bonjour, Depuis 2 mois j’essaye de televerse le firmware (#include <MattzoController_Library.h>
      #include <MattzoController_Network_Configuration.h>) avec Arduino Ide v 1.8.15 et j’ai toujours les memes messages d’erreurs
      In file included from C:\Users\popsm\AppData\Local\Temp\arduino_modified_sketch_231312\sketch_jun03a.ino:1:
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h: In function ‘void setStatusLED(bool)’:
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h:167:7: error: ‘STATUS_LED_PIN_INSTALLED’ was not declared in this scope
      167 | if (STATUS_LED_PIN_INSTALLED) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h:168:18: error: ‘STATUS_LED_PIN’ was not declared in this scope
      168 | digitalWrite(STATUS_LED_PIN, ledState ? HIGH : LOW);
      | ^~~~~~~~~~~~~~
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h: In function ‘void reconnectMQTT()’:
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h:283:9: error: ‘TRIGGER_EBREAK_UPON_DISCONNECT’ was not declared in this scope
      283 | if (TRIGGER_EBREAK_UPON_DISCONNECT) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h: In function ‘void setupSysLog(char*)’:
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h:351:20: error: ‘SYSLOG_APP_NAME’ was not declared in this scope
      351 | syslog.appName(SYSLOG_APP_NAME);
      | ^~~~~~~~~~~~~~~
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h: In function ‘void setupMattzoController()’:
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h:390:7: error: ‘STATUS_LED_PIN_INSTALLED’ was not declared in this scope
      390 | if (STATUS_LED_PIN_INSTALLED) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h:391:13: error: ‘STATUS_LED_PIN’ was not declared in this scope
      391 | pinMode(STATUS_LED_PIN, OUTPUT);
      | ^~~~~~~~~~~~~~
      C:\Program Files (x86)\Arduino\libraries\MattzoBricks/MattzoController_Library.h:395:30: error: ‘MATTZO_CONTROLLER_TYPE’ was not declared in this scope; did you mean ‘MAX_CONTROLLER_ID’?
      395 | createMattzoControllerName(MATTZO_CONTROLLER_TYPE, mattzoControllerId);
      | ^~~~~~~~~~~~~~~~~~~~~~
      | MAX_CONTROLLER_ID
      In file included from C:\Users\popsm\AppData\Local\Temp\arduino_modified_sketch_231312\sketch_jun03a.ino:2:

      etc….
      Si je prends un exemple de Arduino tout se passe bien.
      Ou est le probleme.
      Qui peut m’aider Merci O. Wagner

      • This reply was modified 2 years, 10 months ago by Oscar WagnerOscar WAGNER.
Viewing 17 reply threads
  • You must be logged in to reply to this topic.