From c11c0ff910a20b224503dbebe818b4bce52f7384 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Tue, 2 Mar 2021 11:12:48 +0100 Subject: [PATCH 01/19] Fixed WebcamServer to use spiffs. --- samples/WebcamServer/app/application.cpp | 4 +++- samples/WebcamServer/component.mk | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/WebcamServer/app/application.cpp b/samples/WebcamServer/app/application.cpp index 61109a6563..5fe22ee088 100644 --- a/samples/WebcamServer/app/application.cpp +++ b/samples/WebcamServer/app/application.cpp @@ -83,9 +83,11 @@ void startWebServer() void init() { - Serial.begin(SERIAL_BAUD_RATE); // 115200 by default + Serial.begin(SERIAL_BAUD_RATE); // Enable serial Serial.systemDebugOutput(true); // Allow debug output to serial + spiffs_mount(); + WifiStation.enable(true); System.onReady(startWebServer); diff --git a/samples/WebcamServer/component.mk b/samples/WebcamServer/component.mk index f408ca2b88..5acc510571 100644 --- a/samples/WebcamServer/component.mk +++ b/samples/WebcamServer/component.mk @@ -1,3 +1,3 @@ ARDUINO_LIBRARIES := WebCam - +HWCONFIG := spiffs SPIFF_FILES = web/build From ecd82c93610b3b3fae35f07c65f7d0785ddaf815 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Tue, 2 Mar 2021 11:26:00 +0100 Subject: [PATCH 02/19] Remove potential memory leak. A Wifi station can get disconnected and connected multiple times. --- samples/SystemClock_NTP/app/application.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/SystemClock_NTP/app/application.cpp b/samples/SystemClock_NTP/app/application.cpp index 21532d0b23..7134d19841 100644 --- a/samples/SystemClock_NTP/app/application.cpp +++ b/samples/SystemClock_NTP/app/application.cpp @@ -87,7 +87,9 @@ void gotIP(IpAddress ip, IpAddress netmask, IpAddress gateway) // ntpClient = new NtpClient("my_ntp_server", myrefreshinterval); // When using Delegate Callback Option 2 - demo = new NtpClientDemo(); + if(demo == nullptr) { + demo = new NtpClientDemo(); + } } // Will be called when WiFi hardware and software initialization was finished From cb33062f7b7936ec55dc1d1f8b67809efd8e983e Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Tue, 2 Mar 2021 11:57:12 +0100 Subject: [PATCH 03/19] Renamed sample to what it actually is: Telnet_Server. --- samples/{Telnet_TCPServer_TCPClient => Telnet_Server}/.cproject | 0 samples/{Telnet_TCPServer_TCPClient => Telnet_Server}/.project | 2 +- samples/{Telnet_TCPServer_TCPClient => Telnet_Server}/Makefile | 0 .../{Telnet_TCPServer_TCPClient => Telnet_Server}/README.rst | 0 .../app/application.cpp | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename samples/{Telnet_TCPServer_TCPClient => Telnet_Server}/.cproject (100%) rename samples/{Telnet_TCPServer_TCPClient => Telnet_Server}/.project (95%) rename samples/{Telnet_TCPServer_TCPClient => Telnet_Server}/Makefile (100%) rename samples/{Telnet_TCPServer_TCPClient => Telnet_Server}/README.rst (100%) rename samples/{Telnet_TCPServer_TCPClient => Telnet_Server}/app/application.cpp (100%) diff --git a/samples/Telnet_TCPServer_TCPClient/.cproject b/samples/Telnet_Server/.cproject similarity index 100% rename from samples/Telnet_TCPServer_TCPClient/.cproject rename to samples/Telnet_Server/.cproject diff --git a/samples/Telnet_TCPServer_TCPClient/.project b/samples/Telnet_Server/.project similarity index 95% rename from samples/Telnet_TCPServer_TCPClient/.project rename to samples/Telnet_Server/.project index c212ceedfb..aef1d14e81 100644 --- a/samples/Telnet_TCPServer_TCPClient/.project +++ b/samples/Telnet_Server/.project @@ -1,6 +1,6 @@ - Telnet_TCPServer_TCPClient + Telnet_Server SmingFramework diff --git a/samples/Telnet_TCPServer_TCPClient/Makefile b/samples/Telnet_Server/Makefile similarity index 100% rename from samples/Telnet_TCPServer_TCPClient/Makefile rename to samples/Telnet_Server/Makefile diff --git a/samples/Telnet_TCPServer_TCPClient/README.rst b/samples/Telnet_Server/README.rst similarity index 100% rename from samples/Telnet_TCPServer_TCPClient/README.rst rename to samples/Telnet_Server/README.rst diff --git a/samples/Telnet_TCPServer_TCPClient/app/application.cpp b/samples/Telnet_Server/app/application.cpp similarity index 100% rename from samples/Telnet_TCPServer_TCPClient/app/application.cpp rename to samples/Telnet_Server/app/application.cpp From a1b6d41774895ae60bde2a22b53ca91209135706 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Tue, 2 Mar 2021 11:50:36 +0100 Subject: [PATCH 04/19] Minor typos. --- samples/Basic_APA102/app/application.cpp | 8 ++++---- samples/Basic_Capsense/README.rst | 2 +- samples/Basic_Capsense/app/application.cpp | 4 ++-- samples/Basic_SmartConfig/README.rst | 4 ++-- samples/ScreenLCD_5110/README.rst | 2 +- samples/ScreenTFT_ILI9340-ILI9341/README.rst | 2 +- samples/ScreenTFT_ST7735/README.rst | 2 +- samples/TcpClient_NarodMon/README.rst | 2 +- samples/Temperature_DS1820/README.rst | 2 +- samples/Temperature_DS1820/app/application.cpp | 2 +- samples/Ultrasonic_HCSR04/README.rst | 6 ++---- samples/Ultrasonic_HCSR04/app/application.cpp | 4 ++-- 12 files changed, 19 insertions(+), 21 deletions(-) diff --git a/samples/Basic_APA102/app/application.cpp b/samples/Basic_APA102/app/application.cpp index e4a7dd0902..463401b5f3 100644 --- a/samples/Basic_APA102/app/application.cpp +++ b/samples/Basic_APA102/app/application.cpp @@ -1,14 +1,14 @@ /* * File: APA102 LED class demo for Sming framework - * + * * Original Author: https://github.com/HappyCodingRobot * - * This library support the APA102 LED with integrated controller chip. - * + * This library supports the APA102 LED with integrated controller chip. + * * * hardware SPI: clk=GPIO14 , mosi=GPIO13 * software SPI: user defined - * + * */ #include diff --git a/samples/Basic_Capsense/README.rst b/samples/Basic_Capsense/README.rst index 9c1ef483bb..d909a0eb06 100644 --- a/samples/Basic_Capsense/README.rst +++ b/samples/Basic_Capsense/README.rst @@ -1,4 +1,4 @@ Basic Capsense ============== -Simple demonstration showing Displays raw output from a capacitive sensor. +Simple demonstration showing raw output from a capacitive sensor. diff --git a/samples/Basic_Capsense/app/application.cpp b/samples/Basic_Capsense/app/application.cpp index b61f58da1f..38f07eae8e 100644 --- a/samples/Basic_Capsense/app/application.cpp +++ b/samples/Basic_Capsense/app/application.cpp @@ -3,8 +3,8 @@ #include // http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense -// Im using a 250K resistor currently. Using 500K seems to timeout. Im guessing that the higher -// Clock speed on the ESP means we need a higher charge current than arduino ?? +// I'm using a 250K resistor currently. Using 500K seems to timeout. I'm guessing that the higher +// clock speed on the ESP means we need a higher charge current than arduino ?? // Further investigation required. CapacitiveSensor cs_0_2 = CapacitiveSensor(0, 2); //Send pin 0, Receive Pin 2. diff --git a/samples/Basic_SmartConfig/README.rst b/samples/Basic_SmartConfig/README.rst index 72fa7ae120..bc0b64f2c7 100644 --- a/samples/Basic_SmartConfig/README.rst +++ b/samples/Basic_SmartConfig/README.rst @@ -11,8 +11,8 @@ a special signature. It then tries to extract data like SSID and password from i The App on your smart phone sends out that information. The example here shows how to use ESP_TOUCH method to do smart -configuration on the device. It ported from the C code that -Espressif provides in the SDK examples. +configuration on the device. It is ported from the C code that +Espressif provides in their SDK examples. You will need an App for your Smart Phone, such as: diff --git a/samples/ScreenLCD_5110/README.rst b/samples/ScreenLCD_5110/README.rst index 5e3d8cb7b6..5583eacace 100644 --- a/samples/ScreenLCD_5110/README.rst +++ b/samples/ScreenLCD_5110/README.rst @@ -1,4 +1,4 @@ 5110 LCD Screen =============== -How to interface to Monochrome Nokia 5110 LCD Displays. +Demonstration of how to interface to Monochrome Nokia 5110 LCD Displays. diff --git a/samples/ScreenTFT_ILI9340-ILI9341/README.rst b/samples/ScreenTFT_ILI9340-ILI9341/README.rst index fe38ff7bf7..48e3cbb0a2 100644 --- a/samples/ScreenTFT_ILI9340-ILI9341/README.rst +++ b/samples/ScreenTFT_ILI9340-ILI9341/README.rst @@ -1,5 +1,5 @@ ILI9340 and ILI9341 TFT Screens =============================== -How to interface with displays such as the +Demonstration of how to interface with displays such as the `Adafruit 2.8” Touch Shield V2 (SPI) `__. diff --git a/samples/ScreenTFT_ST7735/README.rst b/samples/ScreenTFT_ST7735/README.rst index 6976cca1d7..41a6eb473f 100644 --- a/samples/ScreenTFT_ST7735/README.rst +++ b/samples/ScreenTFT_ST7735/README.rst @@ -1,4 +1,4 @@ ST7735 TFT Screen ================= -How to interface with various SPI displays using the Adafruit ST7735 library. +Demonstration of how to interface with various SPI displays using the Adafruit ST7735 library. diff --git a/samples/TcpClient_NarodMon/README.rst b/samples/TcpClient_NarodMon/README.rst index b317ad9b68..689cdb6cf0 100644 --- a/samples/TcpClient_NarodMon/README.rst +++ b/samples/TcpClient_NarodMon/README.rst @@ -3,7 +3,7 @@ TCP Client NarodMon An example of sending data to narodmon.ru using a TCP client. -https://narodmon.ru was is a geo-information project to display on the world map and control +https://narodmon.ru is a geo-information project to display on the world map and control (on PCs, smartphones and other gadgets) the sensor readings of its members (temperature, humidity, pressure, wind speed and direction, radiation, energy consumption and any other values), as well as private and urban webcams for public or private viewing. diff --git a/samples/Temperature_DS1820/README.rst b/samples/Temperature_DS1820/README.rst index a135e2fbc9..f666bae0b6 100644 --- a/samples/Temperature_DS1820/README.rst +++ b/samples/Temperature_DS1820/README.rst @@ -1,7 +1,7 @@ DS1820 Temperature Sensor ========================= -ESP8266 DS1820/DS18B20 sensor reader. +DS1820/DS18B20 sensor reader. .. image:: ds1820.jpg :height: 192px diff --git a/samples/Temperature_DS1820/app/application.cpp b/samples/Temperature_DS1820/app/application.cpp index d51b5537ef..8bc84bd224 100644 --- a/samples/Temperature_DS1820/app/application.cpp +++ b/samples/Temperature_DS1820/app/application.cpp @@ -9,7 +9,7 @@ Timer procTimer; // (At the moment 4 pcs - it depends on the definition in the library) // Measuring time: 1.2 seconds * number of sensors // The main difference with the previous version of the demo: -// - Do not use the Delay function () which discourages by manufacturer of ESP8266 +// - Do not use the Delay function () which is discouraged by the manufacturer of ESP8266 // - We can read several sensors // Usage: // Call Init to setup pin eg. ReadTemp.Init(2); //pin 2 selected diff --git a/samples/Ultrasonic_HCSR04/README.rst b/samples/Ultrasonic_HCSR04/README.rst index 8f61f9459a..2e217567b0 100644 --- a/samples/Ultrasonic_HCSR04/README.rst +++ b/samples/Ultrasonic_HCSR04/README.rst @@ -6,8 +6,6 @@ Shows how to use an HCSR04 module to measure distances. .. warning:: Ultrasonic_HCSR04 modules usually work with 5v power and TTL levels, - so You need voltage divider or level shifter for ECHO pin. + so you NEED voltage divider or level shifter for ECHO pin. -Trigger pin is tolerant for 3.3v and in my case work without problems - -By nik.sharky http://esp8266.ru/forum/members/sharky.396/ +Trigger pin is tolerant to 3.3v and should work without problems. diff --git a/samples/Ultrasonic_HCSR04/app/application.cpp b/samples/Ultrasonic_HCSR04/app/application.cpp index 3c18df6255..bf3d87e8ba 100644 --- a/samples/Ultrasonic_HCSR04/app/application.cpp +++ b/samples/Ultrasonic_HCSR04/app/application.cpp @@ -1,9 +1,9 @@ /** * WARNING ! * Ultrasonic_HCSR04 modules usually work with 5v power and TTL levels, - * so You need voltage divider or level shifter for ECHO pin. + * so you NEED voltage divider or level shifter for ECHO pin. * - * Trigger pin is tolerant for 3.3v and in my case work without problems + * Trigger pin is tolerant to 3.3v and should work without problems * * By nik.sharky http://esp8266.ru/forum/members/sharky.396/ */ From 04bbec19756f7b24e5fec5cf95642e71e3937e85 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 12:08:41 +0100 Subject: [PATCH 05/19] Fixed broken links. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 098cf7b11a..be7cc819fc 100644 --- a/README.md +++ b/README.md @@ -67,17 +67,17 @@ Please note Version 4 documentation is at [sming.readthedocs.io](https://sming.r * Async TCP and UDP stack based on [LWIP](http://savannah.nongnu.org/projects/lwip/). * With clients supporting: HTTP, MQTT, WebSockets and SMTP. * And servers for: DNS, FTP, HTTP(+ WebSockets), Telnet. - * With [SSL support](https://sming.readthedocs.io/en/latest/framework/core/network/ssl.html) for all network clients and servers. Based on [axTLS](http://axtls.sourceforge.net/) and [BearSSL](https://www.bearssl.org/). + * With [SSL support](https://sming.readthedocs.io/en/latest/_inc/Sming/Components/ssl/index.html) for all network clients and servers. Based on [axTLS](http://axtls.sourceforge.net/) and [BearSSL](https://www.bearssl.org/). * Out of the box support for OTA over HTTPS. * ESP8266 specific features. * Integrated boot loader [rboot](https://sming.readthedocs.io/en/latest/_inc/Sming/Components/rboot/index.html) with support for 1MB ROMs, OTA firmware updating and ROM switching. - * [Crash handlers](https://sming.readthedocs.io/en/latest/information/debugging/index.html) for analyzing/handling system restarts due to fatal errors or WDT resets. + * [Crash handlers](https://sming.readthedocs.io/en/latest/information/debugging.html) for analyzing/handling system restarts due to fatal errors or WDT resets. * [PWM support](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/driver/index.html) based on [Stefan Bruens PWM](https://github.com/StefanBruens/ESP8266_new_pwm.git). * Optional [custom heap allocation](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/heap/index.html) based on [Umm Malloc](https://github.com/rhempel/umm_malloc.git). * Based on Espressif NONOS SDK. Officially suppored NON SDK version is >= 3.0.1. * Support for a [thin No-Wifi-SDK](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/esp_no_wifi/index.html). Helpful when a project does not require WiFi (or networking) and reduces code size and memory usage signficantly. * Linux/Windows features - * Sming has a [host emulator](https://sming.readthedocs.io/en/latest/arch/host/host-emulator.html) that allows libraries and sample applications to be compiled on a Linux/Windows host system and be tested before uploading them to an actual microcontroller. + * Sming has a [host emulator](https://sming.readthedocs.io/en/latest/arch/host/index.html) that allows libraries and sample applications to be compiled on a Linux/Windows host system and be tested before uploading them to an actual microcontroller. ## Compatibility @@ -136,7 +136,7 @@ git clone https://github.com/SmingHub/Sming.git ## Getting Started -Sming supports multiple architectures. Choose the architecture of your choice to [install the needed development software](https://sming.readthedocs.io/en/latest/getting-started.html) and toolchain(s). +Sming supports multiple architectures. Choose the architecture of your choice to [install the needed development software](https://sming.readthedocs.io/en/latest/getting-started) and toolchain(s). You can also try Sming without installing anything locally. We have an [interactive tutorial](https://www.katacoda.com/slaff/scenarios/sming-host-emulator) that can be run directly from your browser. From 54dfd41884556ad35bc554bbabe11aec3680859f Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 12:37:20 +0100 Subject: [PATCH 06/19] Fix the documents installation on travis. --- Sming/Arch/Host/Tools/travis/build.run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Sming/Arch/Host/Tools/travis/build.run.sh b/Sming/Arch/Host/Tools/travis/build.run.sh index 2bfa88cfa0..1b24170fc9 100755 --- a/Sming/Arch/Host/Tools/travis/build.run.sh +++ b/Sming/Arch/Host/Tools/travis/build.run.sh @@ -23,4 +23,5 @@ $MAKE_PARALLEL tests mv $SMING_PROJECTS_DIR/samples .. mv $SMING_PROJECTS_DIR/tests .. unset SMING_PROJECTS_DIR +$SMING_HOME/../Tools/install.sh doc make docs V=1 From a4fa06632c26c8482d49ce4daefda7d8c203c1f7 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 12:54:26 +0100 Subject: [PATCH 07/19] Removed obsolete setting. --- samples/Nextion_Button/component.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/Nextion_Button/component.mk b/samples/Nextion_Button/component.mk index 538e725470..7ffeff230d 100644 --- a/samples/Nextion_Button/component.mk +++ b/samples/Nextion_Button/component.mk @@ -1,3 +1 @@ ARDUINO_LIBRARIES := ITEADLIB_Arduino_Nextion - -ENABLE_NEXTION = 1 From 18aa7f0650d516435be55f0c5a03241b736d4617 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 13:06:48 +0100 Subject: [PATCH 08/19] Demonstrate WIFI disabling. --- samples/Basic_Neopixel/app/application.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/Basic_Neopixel/app/application.cpp b/samples/Basic_Neopixel/app/application.cpp index 463f09e642..71e946e406 100644 --- a/samples/Basic_Neopixel/app/application.cpp +++ b/samples/Basic_Neopixel/app/application.cpp @@ -160,14 +160,16 @@ void init() Serial.print("NeoPixel demo .. start"); - // Wifi could be used eg. for switching Neopixel from internet - // could be also dissabled if no needed +#ifndef DISABLE_WIFI + // Wifi could be used eg. for switching Neopixel from internet. + // If not needed compile this sample with `make DISABLE_WIFI=1` WifiStation.config(WIFI_SSID, WIFI_PWD); WifiStation.enable(true); WifiAccessPoint.enable(false); WifiEvents.onStationDisconnect(connect_Fail); WifiEvents.onStationGotIP(got_IP); +#endif StripDemoType = 0; //demo index to be displayed From 6a2f990211966baa626febc2f145e4f9577820bc Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 13:10:33 +0100 Subject: [PATCH 09/19] Removed empty component.mk. --- samples/Basic_ScannerI2C/component.mk | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 samples/Basic_ScannerI2C/component.mk diff --git a/samples/Basic_ScannerI2C/component.mk b/samples/Basic_ScannerI2C/component.mk deleted file mode 100644 index e69de29bb2..0000000000 From b6bb6837dcf85b30449bf1eef17d3d009f199848 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 13:30:39 +0100 Subject: [PATCH 10/19] Renamed sample output to the standard example.output.txt. --- .../Basic_Serial/{printf_test_output.txt => example.output.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename samples/Basic_Serial/{printf_test_output.txt => example.output.txt} (100%) diff --git a/samples/Basic_Serial/printf_test_output.txt b/samples/Basic_Serial/example.output.txt similarity index 100% rename from samples/Basic_Serial/printf_test_output.txt rename to samples/Basic_Serial/example.output.txt From 3a585dbc3d4a45fae91b950c8930b43ac665cf41 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 13:43:15 +0100 Subject: [PATCH 11/19] Removed example output that is not matching the sample application. --- samples/Compass_HMC5883L/README.rst | 2 +- samples/Compass_HMC5883L/example.output.txt | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 samples/Compass_HMC5883L/example.output.txt diff --git a/samples/Compass_HMC5883L/README.rst b/samples/Compass_HMC5883L/README.rst index dba07bfdb1..53e3e34449 100644 --- a/samples/Compass_HMC5883L/README.rst +++ b/samples/Compass_HMC5883L/README.rst @@ -1,7 +1,7 @@ HMC5883L Compass ================ -ESP8266 HMC5883L sensor reader. +HMC5883L sensor reader. .. image:: hmc5883l.jpg :height: 192px diff --git a/samples/Compass_HMC5883L/example.output.txt b/samples/Compass_HMC5883L/example.output.txt deleted file mode 100644 index 011a56af6d..0000000000 --- a/samples/Compass_HMC5883L/example.output.txt +++ /dev/null @@ -1,5 +0,0 @@ -LightSensor available: 1 -Reading -Light: 75 lux -Reading -Light: 78 lux From 4e713a3a05285340211b6f5c01b9984d6bf4a8c8 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 13:49:26 +0100 Subject: [PATCH 12/19] Minor code reorganization and text changes. --- samples/DFPlayerMini/README.rst | 10 +++++----- samples/DFPlayerMini/app/application.cpp | 13 +++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/samples/DFPlayerMini/README.rst b/samples/DFPlayerMini/README.rst index fe435d6b9e..49617dacac 100644 --- a/samples/DFPlayerMini/README.rst +++ b/samples/DFPlayerMini/README.rst @@ -4,10 +4,10 @@ DFPlayer Mini Introduction ------------ -The DFPlayer Mini MP3 Player is a small and low price MP3 module with an +The DFPlayer Mini MP3 Player is a small and low-cost MP3 module with a simplified output directly to the speaker. The module can be used as a stand alone module with attached battery, speaker and push buttons or -used in combination with an ESP8266 via RX/TX. +used in combination with an ESP8266/ESP32 via RX/TX. For more details see this link: https://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299 @@ -16,7 +16,7 @@ Building -------- Steps to test this sample: \* Connect DFPlayer Mini using RX/TX pins to -TX/RX pins respectively of ESP8266. \* Copy one or more mp3 file to an -SD card. The example playes one file for some time and moves to next -one. \* Insert that SD card in the slot of the DF Player module. \* +TX/RX pins respectively of ESP8266. \* Copy one or more mp3 files to your +SD card. The example playes one file for some time and moves to the next +one. \* Insert your SD card in the slot of the DF Player module. \* Flash and run the sample code. diff --git a/samples/DFPlayerMini/app/application.cpp b/samples/DFPlayerMini/app/application.cpp index a32e84b915..819dbb7421 100644 --- a/samples/DFPlayerMini/app/application.cpp +++ b/samples/DFPlayerMini/app/application.cpp @@ -5,20 +5,21 @@ #define GPIO_LED 2 Timer timerDFPlayer; -DFRobotDFPlayerMini player; -void nextSong() -{ - player.next(); -} - Timer timerLedBlink; +DFRobotDFPlayerMini player; bool ledState = true; + void blink() { digitalWrite(GPIO_LED, ledState); ledState = !ledState; } +void nextSong() +{ + player.next(); +} + void init() { Serial.begin(9600); From 14e12cff9c845dd9d65568e78b741f77145b1669 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 13:52:30 +0100 Subject: [PATCH 13/19] Spiffs are not required for the instapush and thinkspeak samples. --- samples/HttpClient_Instapush/app/application.cpp | 2 -- samples/HttpClient_Instapush/component.mk | 2 -- samples/HttpClient_ThingSpeak/README.rst | 2 +- samples/HttpClient_ThingSpeak/app/application.cpp | 2 -- samples/HttpClient_ThingSpeak/component.mk | 2 -- 5 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 samples/HttpClient_ThingSpeak/component.mk diff --git a/samples/HttpClient_Instapush/app/application.cpp b/samples/HttpClient_Instapush/app/application.cpp index 68124a099d..078f6a3fdc 100644 --- a/samples/HttpClient_Instapush/app/application.cpp +++ b/samples/HttpClient_Instapush/app/application.cpp @@ -100,8 +100,6 @@ void gotIP(IpAddress ip, IpAddress netmask, IpAddress gateway) void init() { - spiffs_mount(); // Mount file system, in order to work with files - Serial.begin(SERIAL_BAUD_RATE); // 115200 by default Serial.systemDebugOutput(true); // Debug output to serial diff --git a/samples/HttpClient_Instapush/component.mk b/samples/HttpClient_Instapush/component.mk index 8786c2333d..6fad8b7821 100644 --- a/samples/HttpClient_Instapush/component.mk +++ b/samples/HttpClient_Instapush/component.mk @@ -1,3 +1 @@ -HWCONFIG := spiffs -SPIFF_FILES := ARDUINO_LIBRARIES := ArduinoJson6 diff --git a/samples/HttpClient_ThingSpeak/README.rst b/samples/HttpClient_ThingSpeak/README.rst index caed46fdf2..a54b5ef731 100644 --- a/samples/HttpClient_ThingSpeak/README.rst +++ b/samples/HttpClient_ThingSpeak/README.rst @@ -1,7 +1,7 @@ ThingSpeak Http Client ====================== -Example of HttpClient and direct ESP8266 `ThingSpeak `__ data pushing. +Example of a HttpClient pushing data to `ThingSpeak `__ . .. image:: thing-speak.png :height: 192px diff --git a/samples/HttpClient_ThingSpeak/app/application.cpp b/samples/HttpClient_ThingSpeak/app/application.cpp index c7fee25bd0..f25e28e41c 100644 --- a/samples/HttpClient_ThingSpeak/app/application.cpp +++ b/samples/HttpClient_ThingSpeak/app/application.cpp @@ -69,8 +69,6 @@ void gotIP(IpAddress ip, IpAddress netmask, IpAddress gateway) void init() { - spiffs_mount(); // Mount file system, in order to work with files - Serial.begin(SERIAL_BAUD_RATE); // 115200 by default Serial.systemDebugOutput(false); // Disable debug output to serial diff --git a/samples/HttpClient_ThingSpeak/component.mk b/samples/HttpClient_ThingSpeak/component.mk deleted file mode 100644 index ab4cb6eed9..0000000000 --- a/samples/HttpClient_ThingSpeak/component.mk +++ /dev/null @@ -1,2 +0,0 @@ -HWCONFIG := spiffs -SPIFF_FILES := From bbf423bd5958bb284b621c46d8d1d8a567cfd660 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 15:30:56 +0100 Subject: [PATCH 14/19] Removed dump.bat file. Not related to the sample. --- samples/MeteoControl/dump.bat | 1 - samples/MeteoControl_mqtt/dump.bat | 1 - 2 files changed, 2 deletions(-) delete mode 100644 samples/MeteoControl/dump.bat delete mode 100644 samples/MeteoControl_mqtt/dump.bat diff --git a/samples/MeteoControl/dump.bat b/samples/MeteoControl/dump.bat deleted file mode 100644 index ca9c4ae7b6..0000000000 --- a/samples/MeteoControl/dump.bat +++ /dev/null @@ -1 +0,0 @@ -C:\Espressif\xtensa-lx106-elf\bin\xtensa-lx106-elf-objdump -S .\out\build\app.out > .\out\app.asm \ No newline at end of file diff --git a/samples/MeteoControl_mqtt/dump.bat b/samples/MeteoControl_mqtt/dump.bat deleted file mode 100644 index ca9c4ae7b6..0000000000 --- a/samples/MeteoControl_mqtt/dump.bat +++ /dev/null @@ -1 +0,0 @@ -C:\Espressif\xtensa-lx106-elf\bin\xtensa-lx106-elf-objdump -S .\out\build\app.out > .\out\app.asm \ No newline at end of file From e74cc5a903eaa1f7680ee84da864ce8f401668ef Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 15:40:24 +0100 Subject: [PATCH 15/19] Removed spaces around value. --- samples/Basic_Ssl/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Basic_Ssl/README.rst b/samples/Basic_Ssl/README.rst index 9bfdbeda7a..d82e88e76f 100644 --- a/samples/Basic_Ssl/README.rst +++ b/samples/Basic_Ssl/README.rst @@ -42,4 +42,4 @@ Memory usage SSL uses a significant amount of RAM. You can build this sample to track heap usage and output statistics every 5 seconds:: - make ENABLE_MALLOC_COUNT = 1 + make ENABLE_MALLOC_COUNT=1 From 103fcd8687f2596acc0332eb43505b05af4d3e21 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 15:42:42 +0100 Subject: [PATCH 16/19] Minor cleanup to HttpServer Bootstrap sample. --- samples/HttpServer_Bootstrap/README.rst | 6 ++---- samples/HttpServer_Bootstrap/app/application.cpp | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/samples/HttpServer_Bootstrap/README.rst b/samples/HttpServer_Bootstrap/README.rst index cdac6ba601..d5f1a3a69a 100644 --- a/samples/HttpServer_Bootstrap/README.rst +++ b/samples/HttpServer_Bootstrap/README.rst @@ -1,11 +1,9 @@ Bootstrap Http Server ===================== -ESP8266 embedded web server. +Embedded web server. -At start ESP will download all requried files from remote server. All -content, including JQuery and Bootstrap will be saved on device (and -can work offline). Static files stored in GZIPed mode. +This sample will download all requried files from a remote server. .. image:: esp8266-web-server.png :height: 192px diff --git a/samples/HttpServer_Bootstrap/app/application.cpp b/samples/HttpServer_Bootstrap/app/application.cpp index 1ed047e917..a925f84485 100644 --- a/samples/HttpServer_Bootstrap/app/application.cpp +++ b/samples/HttpServer_Bootstrap/app/application.cpp @@ -20,7 +20,6 @@ void onIndex(HttpRequest& request, HttpResponse& response) TemplateFileStream* tmpl = new TemplateFileStream("index.html"); auto& vars = tmpl->variables(); vars["counter"] = String(counter); - //vars["ledstate"] = (*portOutputRegister(digitalPinToPort(LED_PIN)) & digitalPinToBitMask(LED_PIN)) ? "checked" : ""; vars["IP"] = WifiStation.getIP().toString(); vars["MAC"] = WifiStation.getMacAddress().toString(); response.sendNamedStream(tmpl); // this template object will be deleted automatically From 36157f7a90a449ba808b9757a983801c72ae44c6 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 15:49:45 +0100 Subject: [PATCH 17/19] Moved user0.bin to files/. --- samples/Basic_Storage/basic_storage.hw | 2 +- samples/Basic_Storage/{ => files}/user0.bin | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename samples/Basic_Storage/{ => files}/user0.bin (100%) diff --git a/samples/Basic_Storage/basic_storage.hw b/samples/Basic_Storage/basic_storage.hw index aad639cc4f..8ba48a1e2e 100644 --- a/samples/Basic_Storage/basic_storage.hw +++ b/samples/Basic_Storage/basic_storage.hw @@ -15,7 +15,7 @@ "size": "16K", "type": "user", "subtype": 0, - "filename": "user0.bin" + "filename": "files/user0.bin" }, "user1": { "address": "0x1F4000", diff --git a/samples/Basic_Storage/user0.bin b/samples/Basic_Storage/files/user0.bin similarity index 100% rename from samples/Basic_Storage/user0.bin rename to samples/Basic_Storage/files/user0.bin From f02a643a77cf9579ae292b32263493e814d89bb1 Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 3 Mar 2021 15:55:52 +0100 Subject: [PATCH 18/19] Fixed URL path. --- samples/CommandProcessing_Debug/files/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/CommandProcessing_Debug/files/index.html b/samples/CommandProcessing_Debug/files/index.html index 1ec2d602b1..650311def8 100644 --- a/samples/CommandProcessing_Debug/files/index.html +++ b/samples/CommandProcessing_Debug/files/index.html @@ -6,7 +6,7 @@