Posts

Showing posts from July, 2021

Arduino #27 AsyncWifimanager ElegantOTA ESP8266 (WiFi Password Mgnt + WiFi Firmware Update)

Image
*** If you are using the ESP32, Please see this:  ESP32 It would be great if every IoT device deployed with OTA capability with Wifimanager.  Then the IoT device would be able to change SSID & password without connecting the device to the computer to update SSID and password as well as FOTA at any time when you wanted. In this tutorial, let’s combine ESPAsync_Wifimanager and AsyncElegantOTA into a code base to become a handy tool for future IoT projects!  I have made WiFiManager & AsyncElegantOTA tutorial videos. If you don't know what they are and how they work for IoT projects, I strongly recommend you to watch these videos first. This time, I used ESPAsync_WiFiManager library, it's because WiFiManager does not work with AsyncElegnatOTA together. We have to change to ESPAsync_WiFiManager.  The main reason for this is that AsnycWiFiManager is using Asynchronous technology. Which means it can accept connections from different sources at the same time. So, while WiFiMana

Arduino #27 AsyncWifimanager ElegantOTA ESP32 (WiFi Password Mgnt. + WiFi Firmware Update)

Image
*** If you are using the ESP8266, Please see this:  ESP8266 It would be great if every IoT device deployed with OTA capability with Wifimanager.  Then the IoT device would be able to change SSID & password without connecting the device to the computer to update SSID and password as well as FOTA at any time when you wanted. In this tutorial, let’s combine ESPAsync_Wifimanager and AsyncElegantOTA into a code base to become a handy tool for future IoT projects!  I have made WiFiManager & AsyncElegantOTA tutorial videos. If you don't know what they are and how they work for IoT projects, I strongly recommend you to watch these videos first. This time, I used ESPAsync_WiFiManager library, it's because WiFiManager does not work with AsyncElegnatOTA together. We have to change to ESPAsync_WiFiManager.  The main reason for this is that AsnycWiFiManager is using Asynchronous technology. Which means it can accept connections from different sources at the same time. So, while WiFi

Android control color RGB LED (Revised for ESP32)

Image
ESP32 Source code on the bottom of this article!  See the original complete project tutorial here:  Android RGB LED Arduino Controller In September 2014, I created this project with Arduino Mini Pro Mini and Android APP loved by so many readers!  There are more than 100,000 App downloads by now!  Since then, quite of few readers asked me how to change the sketch to be used on ESP32 with built-in Bluetooth.  Here it is!! 😀 Be aware that LED PWM pins used on ESP32 were completely different, since Arduino Mini Pro and ESP32 have different architectures.  For ESP32, I used following pins: Pin 13 = Red Pin 12 = Green Pin 14 = Blue Caution: ESP32 does not allow to use pin 6, 7, 8, 9, 10, 11 or it will crash and reboot. I tried...😂 Also, there is no analogWrite() function in ESP32, so I need to change analogWrite() to ledcWrite() with  Channel definition for PWM R channel = 0 G channel = 1 B channel = 2 Setup PWM frequency: 5000 Setup PWM resolution: 8 (8bit = 255 colors) Then I need to se

ESP8266/ESP32 AsyncElegantOTA Wi-Fi OTA

Image
It's always troublesome to update firmware for your IoT projects? Tried Arduino BasicOTA examples, but never get it to work? Then you must try AsyncElegantOTA! It's very easy to use and I've succeed the first time I try it.  For those of you do not have time to watch it all, here is the video timeline for your quick reference. Video Timeline: 00:13 Tutorial summary 00:53 What's OTA & Why 01:25 Tutorial begin 01:36 Install AsyncElegantOTA library 02:32 Download ESPAsyncWebServer & ESPAsyncTCP 02:57 Ensure Arduino board is capable of OTA 03:41 Where to place downloaded libraries 04:09 Open sample AsyncElegantOTA sketch 04:52 Upload sketch 05:05 Open serial monitor to see ESP8266 IP address 05:36 Access to ESP8266 from browser 06:10 Update ESP8266 firmware from browser 06:31 Where to find .bin file in VS Code 06:54 How to create .bin file in Arduino IDE 08:16 OTA update ESP8266 firmware 09:01 Next video tutorial - How to combine ESP8266 project wit