diff --git a/ESP8266WirelessPrintAsync/ESP8266WirelessPrintAsync.ino b/ESP8266WirelessPrintAsync/ESP8266WirelessPrintAsync.ino index e398736..c659fd0 100644 --- a/ESP8266WirelessPrintAsync/ESP8266WirelessPrintAsync.ino +++ b/ESP8266WirelessPrintAsync/ESP8266WirelessPrintAsync.ino @@ -18,6 +18,7 @@ #include "CommandQueue.h" +/* #include const uint16_t PixelCount = 20; // this example assumes 4 pixels, making it smaller will cause a failure @@ -34,6 +35,7 @@ RgbColor black(0); #elif defined(ESP32) NeoPixelBus strip(PixelCount, PixelPin); #endif +*/ // On ESP8266 use the normal Serial() for now, but name it PrinterSerial for compatibility with ESP32 // On ESP32, use Serial1 (rather than the normal Serial0 which prints stuff during boot that confuses the printer) @@ -44,8 +46,9 @@ RgbColor black(0); HardwareSerial PrinterSerial(1); #endif +//#define TELNET_CUSTOM_FORMAT // WirelessPrinting custom format to telnet output WiFiServer telnetServer(23); -WiFiClient serverClient; +WiFiClient telnetClient; AsyncWebServer server(80); DNSServer dns; @@ -56,18 +59,18 @@ DNSServer dns; #define OTA_UPDATES // Enable OTA firmware updates, comment if you don't want it (OTA may lead to security issues because someone may load any code on device) //#define OTA_PASSWORD "" // Uncomment to protect OTA updates and assign a password (inside "") #define MAX_SUPPORTED_EXTRUDERS 6 // Number of supported extruder -#define REPEAT_M115_TIMES 1 // M115 retries with same baud (MAX 255) +#define REPEAT_M115_TIMES 2 // M115 retries with same baud (MAX 255) #define PRINTER_RX_BUFFER_SIZE 0 // This is printer firmware 'RX_BUFFER_SIZE'. If such parameter is unknown please use 0 #define TEMPERATURE_REPORT_INTERVAL 2 // Ask the printer for its temperatures status every 2 seconds #define KEEPALIVE_INTERVAL 2500 // Marlin defaults to 2 seconds, get a little of margin -const uint32_t serialBauds[] = { 115200, 250000, 57600 }; // Marlin valid bauds (removed very low bauds; roughly ordered by popularity to speed things up) +const uint32_t serialBauds[] = { 57600, 115200, 250000, 500000, 921600 }; #define API_VERSION "0.1" #define VERSION "1.3.10" // The sketch on the ESP -bool ESPrestartRequired; // Set this flag in the callbacks to restart ESP +bool ESPrestartRequired = false; // Set this flag in the callbacks to restart ESP // Information from M115 String fwMachineType = "Unknown"; @@ -128,12 +131,12 @@ inline void setLed(const bool status) { } inline void telnetSend(const String line) { - if (serverClient && serverClient.connected()) // send data to telnet client if connected - serverClient.println(line); + if (telnetClient && telnetClient.connected()) // send data to telnet client if connected + telnetClient.println(line); } bool isFloat(const String value) { - for (int i = 0; i < value.length(); ++i) { + for (uint i = 0; i < value.length(); ++i) { char ch = value[i]; if (ch != ' ' && ch != '.' && ch != '-' && !isDigit(ch)) return false; @@ -292,29 +295,74 @@ void handlePrint() { } } +void saveUploadedFullname() { + FileWrapper uploadedfile = storageFS.open("/uploaded.txt", "w"); + for (uint i=0; i storageFS.getMaxPathLength()) - uploadedFullname = "/cached.gco"; // TODO maybe a different solution - file = storageFS.open(uploadedFullname, "w"); // create or truncate file + uploadedFullname = "/received.gcode"; // TODO maybe a different solution + + if (lastUploadedFullname != uploadedFullname) { + // Uncomment next code if you want to remove the last file + /*if (lastUploadedFullname != "") { + storageFS.remove(lastUploadedFullname); + }*/ + } + + receivecount++; + receivecount = receivecount % 4; // We can receive 4 temporary files + tempFilename = String("/tmp")+receivecount; + file = storageFS.open(tempFilename, "w"); // create or truncate file + lcd("Receiving: "+uploadedFullname); + lastUploadedFullname = uploadedFullname; } + //if (receivecount > 1) + // return; + file.write(data, len); if (final) { // upload finished file.close(); - uploadedFileSize = index + len; + tmpFileSize = index + len; + // Early solution: A small size can tell us that there are not a gcode file + // Why: Cura send us two additional files with "true" or "false" inside. + // The word "true" and "false" have less than 5 characters so we can be sure that + // a file bigger than that is the real one. + if (tmpFileSize > 5) { + storageFS.remove(uploadedFullname); + storageFS.rename(tempFilename, uploadedFullname); + uploadedFileSize = tmpFileSize; + saveUploadedFullname(); + } } else - uploadedFileSize = 0; + tmpFileSize = 0; } int apiJobHandler(JsonObject root) { @@ -360,12 +408,12 @@ String M115ExtractString(const String response, const String field) { if (spos != -1) { spos += field.length() + 1; int epos = response.indexOf(':', spos); - if (epos == -1) + if (epos == -1) { epos = response.indexOf('\n', spos); - if (epos == -1) - return response.substring(spos); + return response.substring(spos, epos-1); + } else { - while (epos >= spos && response[epos] != ' ' && response[epos] != '\n') + while ((epos > spos) && (response[epos] != ' ') && (response[epos] != '\n')) --epos; return response.substring(spos, epos); } @@ -376,7 +424,9 @@ String M115ExtractString(const String response, const String field) { bool M115ExtractBool(const String response, const String field, const bool onErrorValue = false) { String result = M115ExtractString(response, field); - + /*telnetSend("field: "+field); + telnetSend("response: "+response); + telnetSend("Result: "+result);*/ return result == "" ? onErrorValue : (result == "1" ? true : false); } @@ -392,6 +442,7 @@ inline String getDeviceName() { #endif } +// NOTE: There are errors somewhere because the service just claim "race-condition" void mDNSInit() { #ifdef OTA_UPDATES MDNS.setInstanceName(getDeviceName().c_str()); // Can't call MDNS.init because it has been already done by 'ArduinoOTA.begin', here I just change instance name @@ -401,8 +452,8 @@ void mDNSInit() { #endif // For Cura WirelessPrint - deprecated in favor of the OctoPrint API - MDNS.addService("wirelessprint", "tcp", 80); - MDNS.addServiceTxt("wirelessprint", "tcp", "version", SKETCH_VERSION); + //MDNS.addService("wirelessprint", "tcp", 80); + //MDNS.addServiceTxt("wirelessprint", "tcp", "version", SKETCH_VERSION); // OctoPrint API // Unfortunately, Slic3r doesn't seem to recognize it @@ -431,7 +482,9 @@ bool detectPrinter() { case 10: // Initialize baud and send a request to printezr #ifdef ESP8266 + PrinterSerial.end(); PrinterSerial.begin(serialBauds[serialBaudIndex]); // See note above; we have actually renamed Serial to Serial1 + //delay(1000); #endif #ifdef ESP32 PrinterSerial.begin(serialBauds[serialBaudIndex], SERIAL_8N1, 32, 33); // gpio32 = rx, gpio33 = tx @@ -466,6 +519,8 @@ bool detectPrinter() { fwAutoreportTempCap = M115ExtractBool(lastReceivedResponse, "Cap:AUTOREPORT_TEMP"); fwProgressCap = M115ExtractBool(lastReceivedResponse, "Cap:PROGRESS"); fwBuildPercentCap = M115ExtractBool(lastReceivedResponse, "Cap:BUILD_PERCENT"); + //M115ExtractBool(lastReceivedResponse, "Cap:SDCARD"); + //M115ExtractBool(lastReceivedResponse, "Cap:ARCS"); mDNSInit(); @@ -486,23 +541,132 @@ bool detectPrinter() { return false; } -void initUploadedFilename() { + + +bool isGcode(String filename) { + int spos = filename.indexOf(".gcode"); + return spos != -1; +} + + +static String list = ""; +#define ITEMS_PER_PAGE 10 // Compromiso en limites de memoria +inline String listGcodeFiles(String sel = "", uint8 page = 0, String search = "") { + MD5Builder md5; + String hash = ""; + list = "
    "; + FileWrapper file; FileWrapper dir = storageFS.open("/"); + uint16_t n = 0; + uint16_t found_n = 0; + + String filename; + search.toLowerCase(); + bool found; + if (dir) { - FileWrapper file = dir.openNextFile(); - while (file && file.isDirectory()) { + file = dir.openNextFile(); + while (file) { + if (isGcode(file.name()) && !file.isDirectory()) + { + n++; + filename = String(file.name()); + filename.toLowerCase(); + found = (search.length() > 0) && (filename.indexOf(search) != -1); + if (found) { found_n++; } + if ((n >= page*ITEMS_PER_PAGE) || found) + { + md5.begin(); + md5.add(file.name()); + md5.calculate(); + hash = md5.toString(); + if (sel.length() > 0) + { + if (strcmp(sel.c_str(), hash.c_str()) == 0) { + list = file.name(); + file.close(); + dir.close(); + return list; + } + } + else + if ((search.length() > 0) && !found) { + } + else + if ((n < ((page+1)*ITEMS_PER_PAGE)) || (found && found_n <= ITEMS_PER_PAGE) ) + { + list += "
  • " + +String(n)+" - " + "" + " "+file.name()+" " + " "+String(file.size())+" bytes." + "
  • "; + } + } + } file.close(); file = dir.openNextFile(); } - if (file) { - uploadedFullname = "/" + file.name(); - uploadedFileSize = file.size(); - file.close(); - } dir.close(); } + if (sel.length() > 0) + { + list = ""; + return list; + } + + list += "
"; + uint8 pages = n / ITEMS_PER_PAGE; + list += "
"; + for (page = 0; page<=pages; page++) { + list += " "+String(page)+" |"; + } + list += "
"; + list += "Total: "+String(n)+" files"; + if (search.length() > 0) { + list += " - Found: "+String(found_n); + } + return list; } + +void initUploadedFilename(String sel = "") { + FileWrapper file; + + if (sel.length() > 0) { + uploadedFullname = "/" + listGcodeFiles(sel); + saveUploadedFullname(); + file = storageFS.open(uploadedFullname); + } + else + { + if (loadUploadedFullname()) + file = storageFS.open(uploadedFullname); + else + { + FileWrapper dir = storageFS.open("/"); + if (dir) { + file = dir.openNextFile(); + while (file && (!isGcode(file.name()) || file.isDirectory()) ) + { + file.close(); + file = dir.openNextFile(); + } + dir.close(); + } + } + } + + if (file) { + uploadedFullname = "/" + file.name(); + uploadedFileSize = file.size(); + file.close(); + } +} + + + + inline String getState() { if (!printerConnected) return "Discovering printer"; @@ -520,6 +684,7 @@ inline String stringify(bool value) { return value ? "true" : "false"; } + void setup() { #if defined(LED_BUILTIN) pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output @@ -568,26 +733,54 @@ void setup() { // Main page server.on("/", HTTP_GET, [](AsyncWebServerRequest * request) { + uint8 page = request->arg(String("p")).toInt(); + + String del = request->arg(String("del")); + if (del.length() > 0) { + storageFS.remove("/"+listGcodeFiles(del, page)); + storageFS.remove("/uploaded.txt"); + initUploadedFilename(); + } + + String sel = request->arg(String("sel")); + if (sel.length() > 0) + initUploadedFilename(sel); + String uploadedName = uploadedFullname; + String search = request->arg(String("search")); + uploadedName.replace("/", ""); - String message = "

" + getDeviceName() + "

" - "
\n" - "

You can also print from the command line using curl:

\n" - "
curl -F \"file=@/path/to/some.gcode\" -F \"print=true\" " + IpAddress2String(WiFi.localIP()) + "/api/files/local
\n" - "Choose a file to upload:
\n" - "\n" - "
\n" - "\n" - "
" - "

\n\n

\n" - "

Download " + uploadedName + "

" - "

Info

" - "
" - "

WirelessPrinting " + SKETCH_VERSION + "

\n" + String message = + "\n" + "

" + getDeviceName() + "

" + "
\n" + "

You can also print from the command line using curl:

\n" + "
curl -F \"file=@/path/to/some.gcode\" -F \"print=true\" " + IpAddress2String(WiFi.localIP()) + "/api/files/local
\n" + "Choose a file to upload:
\n" + "\n" + "
\n" + "\n" + "
" + "
\n" + "\n" + "\n" + "
\n" + "

\n\n

\n" + "

Download " + uploadedName + "

" + "

Info

" + "
"+listGcodeFiles("", page, search)+"
" + "

WirelessPrinting " + SKETCH_VERSION + "

\n" #ifdef OTA_UPDATES - "

OTA Update Device: Click Here

" + "

OTA Update Device: Click Here

" #endif - ; + ; request->send(200, "text/html", message); }); @@ -754,7 +947,7 @@ void setup() { if (!index) content = ""; - for (int i = 0; i < len; ++i) + for (uint i = 0; i < len; ++i) content += (char)data[i]; if (content.length() >= total) { DynamicJsonDocument doc(1024); @@ -892,15 +1085,17 @@ void SendCommands() { } } + void ReceiveResponses() { - static int lineStartPos; - static String serialResponse; +static String serialResponse = ""; +static int lineStartPos = 0; - while (PrinterSerial.available()) { + while (PrinterSerial.available() > 0) { char ch = (char)PrinterSerial.read(); - if (ch != '\n') - serialResponse += ch; - else { + if (ch == '\r') continue; + serialResponse += String(ch); + if (ch == '\n') + { // new line bool incompleteResponse = false; String responseDetail = ""; @@ -939,7 +1134,11 @@ void ReceiveResponses() { } int responseLength = serialResponse.length(); - telnetSend("<" + serialResponse.substring(lineStartPos, responseLength) + "#" + responseDetail + "#"); +#ifdef TELNET_CUSTOM_FORMAT + telnetSend("<" + serialResponse.substring(lineStartPos, responseLength - 1) + "#" + responseDetail + "#"); +#else + telnetSend(serialResponse.substring(lineStartPos, responseLength - 1)); +#endif if (incompleteResponse) lineStartPos = responseLength; else { @@ -960,6 +1159,7 @@ void ReceiveResponses() { serialResponse = ""; restartSerialTimeout(); } + /* // this resets all the neopixels to an off state strip.Begin(); strip.Show(); @@ -972,8 +1172,10 @@ void ReceiveResponses() { strip.SetPixelColor(a, white); } strip.Show(); + */ } +static String clientCommand; void loop() { #ifdef OTA_UPDATES //**************** @@ -1008,9 +1210,18 @@ void loop() { // For now using M112 - Emergency Stop // http://marlinfw.org/docs/gcode/M112.html telnetSend("Should cancel print! This is not working yet"); - commandQueue.push("M112"); // Send to 3D Printer immediately w/o waiting for anything + //commandQueue.push("M112"); // Send to 3D Printer immediately w/o waiting for anything + + // My proposal (I am currently using this method on an + // Ender 3 Pro Marlin 2.0.7.2 with success): + commandQueue.push("M410"); // Quickstop + //commandQueue.push("G10"); // Retract filament + commandQueue.push("M104 S0"); // Set hotend temperature to 0º + commandQueue.push("M140 S0"); // Set bed temperature to 0º + commandQueue.push("G27 P0"); // Park the nozzle + commandQueue.push("M18"); // Disable steppers //playSound(); - //lcd("Print cancelled"); + //lcd("Print aborted"); } if (!autoreportTempEnabled) { @@ -1029,26 +1240,27 @@ void loop() { //* Telnet handling * //******************* // look for Client connect trial - if (telnetServer.hasClient() && (!serverClient || !serverClient.connected())) { - if (serverClient) - serverClient.stop(); + if (telnetServer.hasClient() && (!telnetClient || !telnetClient.connected())) { + if (telnetClient) + telnetClient.stop(); - serverClient = telnetServer.available(); - serverClient.flush(); // clear input buffer, else you get strange characters + telnetClient = telnetServer.available(); + telnetClient.flush(); // clear input buffer, else you get strange characters } - static String telnetCommand; - while (serverClient && serverClient.available()) { // get data from Client - { - char ch = serverClient.read(); + while (telnetClient && telnetClient.available() > 0) { // get data from Client + char ch = telnetClient.read(); if (ch == '\r' || ch == '\n') { - if (telnetCommand.length() > 0) { - commandQueue.push(telnetCommand); - telnetCommand = ""; + if (clientCommand.length() > 0) { + commandQueue.push(clientCommand); + //telnetSend("Received: "+clientCommand); + clientCommand = ""; } } else - telnetCommand += ch; + { + //telnetSend("receiving: "+String(ch)); + clientCommand += String(ch); } } diff --git a/ESP8266WirelessPrintAsync/FileWrapper.cpp b/ESP8266WirelessPrintAsync/FileWrapper.cpp index 489b225..57a2d19 100644 --- a/ESP8266WirelessPrintAsync/FileWrapper.cpp +++ b/ESP8266WirelessPrintAsync/FileWrapper.cpp @@ -146,3 +146,4 @@ FileWrapper FileWrapper::openNextFile() { return fw; } + diff --git a/ESP8266WirelessPrintAsync/StorageFS.cpp b/ESP8266WirelessPrintAsync/StorageFS.cpp index 6fbd174..6a7ab66 100644 --- a/ESP8266WirelessPrintAsync/StorageFS.cpp +++ b/ESP8266WirelessPrintAsync/StorageFS.cpp @@ -47,3 +47,11 @@ void StorageFS::remove(const String filename) { else if (hasSPIFFS) SPIFFS.remove(filename); } + + +void StorageFS::rename(const String filename, const String newfilename) { + if (hasSD) + SD.rename(filename.c_str(), newfilename.c_str()); + else if (hasSPIFFS) + SPIFFS.rename(filename, newfilename); +} diff --git a/ESP8266WirelessPrintAsync/StorageFS.h b/ESP8266WirelessPrintAsync/StorageFS.h index 7db20a6..584695b 100644 --- a/ESP8266WirelessPrintAsync/StorageFS.h +++ b/ESP8266WirelessPrintAsync/StorageFS.h @@ -58,6 +58,7 @@ class StorageFS { static FileWrapper open(const String path, const char *openMode = "r"); static void remove(const String filename); + static void rename(const String filename, const String newfilename); }; extern StorageFS storageFS; diff --git a/README.md b/README.md index ac454b7..256cdbe 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,13 @@ -# WirelessPrinting [![Build Status](https://travis-ci.org/probonopd/WirelessPrinting.svg?branch=master)](https://travis-ci.org/probonopd/WirelessPrinting) +# Improved Wireless Printing # -![](https://user-images.githubusercontent.com/2480569/53683404-5b21ab80-3cf8-11e9-8a6e-647df742612b.jpg) +It is an improved version of [WirelesssPrinting](https://github.com/probonopd/WirelessPrinting) that supports a few more features from web browser (browse files, search, delete...) a little better UI too, specially from mobile phone browsers. And support for recent versions of Cura (correct handling of data and file reception). +It supports an updated version of software and build tools. -Print wirelessly from [Cura](https://ultimaker.com/en/products/cura-software), [PrusaControl](http://prusacontrol.org/), or [Slic3r PE](https://github.com/prusa3d/Slic3r/releases) to your 3D printer connected to an [ESP8266](https://espressif.com/en/products/hardware/esp8266ex/overview) module. -__UNDER DEVELOPMENT__. See [Issues](https://github.com/probonopd/WirelessPrinting/issues). Pull requests welcome! +![](https://user-images.githubusercontent.com/2480569/53683404-5b21ab80-3cf8-11e9-8a6e-647df742612b.jpg) -## Comparison with other printer hosts +Print wirelessly from [Cura](https://ultimaker.com/en/products/cura-software), [PrusaControl](http://prusacontrol.org/), or [Slic3r PE](https://github.com/prusa3d/Slic3r/releases) to your 3D printer connected to an [ESP8266](https://espressif.com/en/products/hardware/esp8266ex/overview) module. -| Printer SD card slot | OctoPrint | WirelessPrint | -| --- | --- | --- | -| Instant | Booting can take minutes | Booting takes seconds | -| Need to plug SD card into computer and then into printer for each print | Ethernet and wireless | Wireless | -| No cost (comes with many printers) | High cost (Raspberry Pi, Power supply, SD card) | Inexpensive | -| No clutter on desktop | Clutter on desktop (Raspberry Pi, cable) | No clutter (can be placed inside printer electronics box) | -| No set-up needed | Set-up needed (full Linux operating system, hundreds of megabytes) | Only quick wireless network setup needed | -| No maintenance needed (other than replacing broken SD card slots) | High maintenance needed (OS updates) | Low maintenance needed (Firmware updates for bugfixes and new features) | -| No extra power consumption | 2.5 W power consumption | Under 1 W power consumption | -| No webcam | Webcam can be attached | ESP32 module with built-in camera (may be supported in the future) | -| No notifications | Notifications, e.g., "print ready" | Notifications possible (send pull requests) | -| Cumbersome for print farms (sneakernet) | Suitable for print farms (can be managed centrally) | Suitable for print farms (can be managed centrally, OctoPrint compatible protocol subset) | ## Hardware @@ -29,7 +17,8 @@ The WEMOS D1 mini module is connected with your 3D printer via the serial connec * TX, RX from your 3D printer to the WEMOS D1 mini module (__AUX-1__ header on RAMPS boards). Note: For ESP32, use GPIO32 = RX, GPIO33 = TX * Power and GND from your 3D printer to the WEMOS D1 mini module (attention, the __AUX-1__ header on RAMPS boards has 5V while the ESP8266 needs 3.3V but the WEMOS D1 mini has a voltage regulator) * Optional: SD card shield to the WEMOS D1 mini module (a capacitor across the power pins of the SD card; SD shields have this). Using a SanDisk 2 GB card formatted with `mkfs.vfat` on Linux seems to work for me. If no SD card is connected, then the internal SPIFFS memory (3 MB) is used. For TTGO-T1, the built-in microSD card slot is used if a card is inserted. -* A matching case for a WEMOS D1 mini module and microSD shield can be found at http://www.thingiverse.com/thing:2287618 +* A matching case for a WEMOS D1 mini module and microSD shield can be found at http://www.thingiverse.com/thing:2287618![fd0e3fa2-01a0-11e7-9d83-dc4e7d031f30](https://user-images.githubusercontent.com/5976100/145873713-a56a46ad-dfa9-407b-82d8-e580a70e9884.png) + ## esp8266/Arduino sketch @@ -123,3 +112,4 @@ Ycan also print from the command line using curl: ``` curl -F "file=@/path/to/some.gcode" -F "print=true" http://the-ip-address/print ``` + diff --git a/WirelessPrinting.code-workspace b/WirelessPrinting.code-workspace new file mode 100644 index 0000000..ea1ebe9 --- /dev/null +++ b/WirelessPrinting.code-workspace @@ -0,0 +1,18 @@ +{ + "folders": [ + { + "path": "." + }, + { + "name": "WirelessPrinting", + "path": "../../../../../home/anyeos/Compartidos/Desarrollo/Impresora3D/WiFi/WirelessPrinting" + } + ], + "settings": { + "idf.adapterTargetName": "esp32", + "idf.openOcdConfigs": [ + "interface/ftdi/esp32_devkitj_v1.cfg", + "target/esp32.cfg" + ] + } +} \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 3ba9c9b..d9d0019 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,40 +10,36 @@ [platformio] src_dir = ESP8266WirelessPrintAsync +default_envs = d1_mini - -# common variables shared by the environments -[common] +[env] framework = arduino -lib_deps = - https://github.com/greiman/SdFat#3b79f38 - https://github.com/me-no-dev/ESPAsyncWebServer#95dedf7 - https://github.com/me-no-dev/ESPAsyncTCP#7e9ed22 - https://github.com/me-no-dev/AsyncTCP#90715ae6 - https://github.com/ayushsharma82/AsyncElegantOTA#4b3528c - https://github.com/alanswx/ESPAsyncWiFiManager#1c02154 - https://github.com/bblanchon/ArduinoJson#3df4efd - https://github.com/Makuna/NeoPixelBus#9619fef - - -# base environments -# can be extended by board-specific environments +lib_deps = + https://github.com/greiman/SdFat#3b79f38 + https://github.com/me-no-dev/ESPAsyncTCP#7e9ed22 + https://github.com/me-no-dev/ESPAsyncWebServer#95dedf7 + https://github.com/ayushsharma82/AsyncElegantOTA#4b3528c + https://github.com/alanswx/ESPAsyncWiFiManager#1c02154 + https://github.com/bblanchon/ArduinoJson#3df4efd +; https://github.com/Makuna/NeoPixelBus#9619fef +lib_ignore = AsyncTCP +build_flags = -DLOG_LOCAL_LEVEL=ESP_LOG_NONE + [base:esp8266] -; corresponds to https://github.com/platformio/platform-espressif8266/releases/tag/v2.0.0 -; see https://github.com/esp8266/Arduino/releases/tag/2.5.0 platform = espressif8266@2.0.0 -framework = ${common.framework} -lib_deps = ${common.lib_deps} +framework = ${env.framework} +lib_deps = ${env.lib_deps} +upload_protocol = espota +upload_port = 192.168.10.13 +;upload_port = /dev/ttyUSB6 + [base:esp32] -; corresponds to https://github.com/platformio/platform-espressif32/releases/tag/v1.8.0 -; see https://github.com/espressif/arduino-esp32/releases/tag/1.0.2 platform = espressif32@1.8.0 -framework = ${common.framework} -lib_deps = - ${common.lib_deps} - https://github.com/bbx10/Hash_tng - +framework = ${env.framework} +lib_deps = + ${common.lib_deps} + https://github.com/bbx10/Hash_tng [env:nodemcuv2] board = nodemcuv2 @@ -53,9 +49,6 @@ extends = base:esp8266 board = d1_mini extends = base:esp8266 -# esp32dev works for the majority of ESP32 based dev boards -# there are more specific board configurations available, feel free to send PRs adding new ones [env:esp32dev] board = esp32dev extends = base:esp32 -