I found this ESP8266-MQTT program on Github.

How can I compile this thing with the Arduino IDE?

I only can open one sketch at a time. If I try to compile this then parts of the program are missing for AVRDUDE - but they are in the same folder.

Please can you help me?

  • Looks like it is all one sketch, though there are multiple .ino files... but the project folder name has to be exactly "ESP8266-MQTT-to-Serial-Bridge", that tells the Arduino IDE that the main project file is named "ESP8266-MQTT-to-Serial-Bridge.ino". The other files contain additional supporting code and must be in the same folder.
    – MarkU
    Mar 17, 2021 at 19:12
  • thanks but it did not work :( I have tried both ways. Mar 17, 2021 at 19:22
  • 1
    Thanks for your answers. I get messages that parts are missing. You must make from ESP8266WiFi.h to WiFI.h I have a ESP32 and i am using Ubuntu. Mar 17, 2021 at 19:38
  • 1
    "I have a ESP32" and... "ESP8266-MQTT-to-Serial-Bridge" ... see the problem?
    – Majenko
    Mar 17, 2021 at 19:50
  • 1
    Though I compiled for the ESP8266. You cannot compile that for the ESP32
    – chrisl
    Mar 17, 2021 at 19:55

1 Answer 1


That sketch is written for the ESP8266, not the ESP32. The two are very different chips, and the libraries used are very different.

You will have to learn how the sketch works, and how the ESP32 libraries work, and port the sketch to the ESP32 once you have learned how.

  • thanks Is there some sketch for the ESP32 ? Mar 17, 2021 at 19:57
  • 1
    There are plenty of sketches for the ESP32. One that does that exact same thing? Dunno. Ask Google.
    – Majenko
    Mar 17, 2021 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.