Outstanding trick. Thanks again to you and the whole team providing these tutos. May I share 2 issues I got with Windows_10 trying to implement the OTA. 1) Mdns capabilities thanks to Apple "Bonjour" software: little puzzled with all the download possibilities of the webpage given in the link. In fact, one should pick "Print services for Windows". Once downloaded, don't run it: open it with WinZip or WinRar to just get Bonjour32.msi or Bonjour64.msi accordingly to the local systemThen, get to the firewall to authorize "Bonjour services" both private & public. 2) When trying to connect OTA, the arduino IDE stopped: java.io.IOException: Cannot run program "python.exe": CreateProcess error=2. It turned out that although installed on the computer, Python is not declared in window's path ! So, make sure that this point is ticked: if not, just fix it (how-to here : www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/)
We owe you a drink! You're absolutely right, so thank you so much for the tips to improve the OTA process. We'll add them to the video description. In the future we want to repeat some videos for Windows users, and we'll definitely add this topic to the list!
thanks a lot - I faced same issues on Windows10. I had to restart PC to get Bonjour Service working. Firewall settings - important hint! I used: support.apple.com/kb/DL999?viewlocale=en_GB&locale=en_GB and I had to install python 2.7.10 as well (as per my research v.3.5.xx an above do not work with Arduino, so I installed 2.7.10) - while installing don't forget to add python to path variable (option to be set in install parameters)
Another great video! Thank you for sharing your knowledge with us. I like the calm and easy understandable style of your explanations! For all beginners: Please do not forget that OTA-updates only work with ESP8266-boards with at least 8Mbit/1MByte memory. So this will not work with the ESP-01. You will get errors when trying to upload OTA. It took me hours to realize that :D
Mine works without the additional ota flags. I just let ArduinoOTA.handle() be called inside the loop() along with my program. Great video! Thank you very much. :)
I have found that if you have a lot going on in your code, or if you have delays, then it can be a little problematic. Best solution I have found is to use millis/previousmillis instead of delay(), and also make sure to define the esp8266 port. Even though it says it defaults to 8266, setting it in the code fixed a lot of issues for me (ie., "No response" errors). Also, if you program it over USB, be sure to do a hard power cycle or else OTA upload will error.
you are THE MAN Iam SUPER new to arduino and i figured this out......NOT EASILY i might add LOL But i figured it out, got everything automated and OTA working with BLYNK making your code work with BLYNK code for a extreme beginner was VERY HARD THANKS ALOT i subscribed keep the good videos coming
Hello, I am in the middle of this video and would like to share that the memory on ESP-01 is easy to update to 4Mbytes. :) I found it on Instructables and it works great! Thank you for your teaching work!
Cool videos! I got two quick questions: 1) If I boot the ESP a month later and he change IP, the IDE will still find it? 2) Did you make the video about uploading firmware on webserver? Thanks!
Yes, if you want to keep the OTA functionality. The minimal things you need are: #include #include #include char ssid[] = "xxxxx"; char pass[] = "xxxxx"; void setup() { // Wi-Fi setup ArduinoOTA.begin(); } void loop() { ArduinoOTA.handle(); // For OTA }
My Arduino IDE is not prompting me for a password if I uncomment out the password section. Everything works fine and I can update the Wemos OTA when no password is required. I'm getting an authentication error so the board is looking for a password, but I'm not getting a prompt to type one. Any ideas?
OK, I take it back and not it's working. Strange? Another question for ya, with the password on I'm not getting prompted for it if I use the webpage to put the board into update mode. So if I call "setflag" I can upload new code, but I don't get asked for a password? How come?
Glad it works. I think the password gets stored in your browser's session. Try incognito mode, and after logging in, try closing the old window and opening a new (incognito as well) one.
@Thomas Cziesla: I did install Python 2.7 but when uploading from IDE the program compiles quickly, starts uploading and hangs forever. I'm using Mac with Sierra 10.13.3. Did I miss something?
Thanks! Happy we're staying on track. We received a couple of ESP-32 demo boards from Espressif we're itching to showcase, and we also have our own development board that we want to demo. So many (awesome) things, so little time! 😂
Great stuff... Well explained video of its kind. However I had issue after uploading the Wifi boot loader.I couldn't see Wifi port even if I restart my Arduino IDE. This solution might help someone: 1. make sure your PC is on same wifi network as on which you configured your boot loader program. 2. if still doesn't works, go to preference > Network and turn off proxy , restart IDE. 3. if still doesn't works, make sure your Wifi network is not blocking some contents from Firewall (usually happens in Universities or restricted Wifi networks)
Hi! My Serial monitor shows IP address but no Network Port is getting generated like yours @5:40 . What did i do wrong? I only see serial port. Please help!
Great Video, very good production Quality as always IMO! But why didn't set time_elapsed = millis() and then in the while loop ask time_elapsed > (millis() - 15000) ? Because what if your setup routine already takes up like 5 seconds? wouldn't you then have only 10 sec left for programming?
Thanks for the kind words :) Yup you're absolutely right, the main reason we used 15sec was to account for cases where *setup()* takes a long time. Still, there could be cases in which it takes longer than 15sec and OTA wouldn't be available at all. It was meant as a quick-n-dirty demo of what's possible, but still using what you suggest would've been better! Another note is that the OTA code only runs either when millis() rolls over (after ~49 days) or when the board resets. If we really want to avoid needing physical access to the board, we'd need to tie a GPIO to the RST pin, and establish a way (e.g., web server path) to trigger the board reset.
Or couldn't you just write a function which initializes the OTA code for a time of 20 secs and call it based on a web server request? This way you wouldn't waste one GPIO ;-)
How to change the firmware of arduino uno which is connected to nodemcu through I2C or SPI ? Will it be possible? If possible please share the method. Thank you
Hey Anas, thanks for watching; we're glad you liked it! In the past that's been true, however, there were plans to increase it. Poking around a bit I found the old thread where it was being discussed: github.com/esp8266/Arduino/issues/570 HTH!
Hi, thnx alot, I went through the post, and the conclusion was that connecting more than 4 clients to an esp8266 server is possible, however, the connection will be very slow and inconsistent, but the final solution was to use a router as an AP, which in my case will cause a problem in case the wifi password was changed, because it would mean changing the password in every single client.
@@datasith yes the ota do sometimes fail.. and annoy a bit . But usb never fails. But ots helps when the devices are not in reach. I love the upload speed .
Great lesson, thanks. What if after you follow all of the steps and everything works OK you put the board in a place that is not easy to get to, like in a scrolling LED sign, and you want to OTA update the text how can you do it if the reset button on the board is not easy to get to?
In my case, even a empty sketch uses over 50% program storage, what makes it impossible to upload a new sketch after one is running. Was there a change with the arduino surrounding? I use the latest AtmelStudio with visualMicro and also tried with the latest Arduino IDE 1.8.5. Do you guys have the same problem these days or do you have a idea what I am doing wrong? Thanks a lot.
Hey, Andreas. Thanks for watching! An empty sketch uses 246063 bytes, which means you have a board with only 512KB of flash (maybe an old ESP-01?). The simplest solution would be to use a different board-the SPI flash can go up to 16MB. Best of luck!
I have a ESP-12F but I combile with the Generic ESP8266 mode. So thats why my combiler shows me 51%. But with that in mind id should work with uploading a new sketch. Unfortunaly until now the ESP crashes after uploading a new .bin file. I will work a bit more on it the next days. Thanks for your input, this clearyfies a lot to me.
@@Andreas-rt5sm are you the "man with the Accent"? If so then I've seen your video on increasing memory on ESP-01 and I like it! Regardless, your bin file is horking up your ESP, I've seen it before. Good luck!
HI, Can you tell me why i am not getting the at command , but able to upload the program and wifi is also discoverable, at command is not coming any one can help to come out of this frustating issue
If you upload custom firmware to the ESP8266, you erase the "AT Commands" firmware. You can flash it back if you need to. Just know that Arduino firmware and AT Commands are different things. HTH!
I tried it for a i2c LCD but it didn't work there was a loop in the display program inside the loop function in which you put your blink code can you provide me a general code for i2c LCD 20X4 display with the basic OTA thanks in advance
I was able to upload the OTA example without issue (without the blink code). My ESP connected to Wifi network and gave me its IP address. However, once I restart Arduino, impossible to find the ESP in my ports. Is there something I need to check on the IDE itself ? The ESP is powered from a wall plug 2 meter away from the computer, both on the same network. It's an ESP-12F module. If anyone has an answer, that'd help a lot !
I have done this with Arduino IDE in Win 10. It works as in the tutorial here. Many viewers do not realize that the libraries allow the code to be transportable between devices. Also be aware that serial monitoring takes a lot of resources; CPU and Memory. I use conditional compilation to only use the print statements during code development.
What's the problem with leaving ArduinoOTA.handle() always in the loop without using the ota_flag variable? ArduinoOTA.handle() is a small overhead method designed to be used in that way so that OTA is always available without the need to reboot the board.
The overhead introduced by ArduinoOTA.handle() is just an IF statement. The same overhead that you introduced with your ota_flag. void ArduinoOTAClass::handle() { if (_state == OTA_RUNUPDATE) { _runUpdate(); _state = OTA_IDLE; } }
Hmm, it seems you didn't really have a question, so we wonder what was the point of original comment. In any case, we can get into compiler specifics, but we choose to defer the discussion for a later time.
I use a similar method just to restrict the possibility of programming the board OTA to first 30 seconds after restarting the board without a need to use authentication. I thought that was the idea behind this video. Thanks for the video.
Hey I did exactly as you said but still I am unable to find OTA in Port. Presently I am using Windows 10 Intel i5, I tried to restart all but nothing worked. In serial port I am able to get IP address and I am able to turn on /off D1 pin using blynk application. Please help to resolve this.
While uploading via IDE at the end of compilation I get the following warning: /Users/minimeccanica/Library/Arduino15/packages/esp8266/hardware/esp8266/2.3.0/tools/espota.py -i 192.168.20.25 -p 8266 --auth= -f /var/folders/76/qs6qrnvj51zbm30mmxxkdd1w0000gn/T/arduino_build_856966/trigBoardRelease_12_18_17.ino.bin". Then the upload process hangs forever. I do have Python installed (2.7), but something is going wrong. Thx for any suggestion
Hmm, weird. We haven't seen this bug before, so it's difficult to debug. Maybe going through the OTA library issues on Github can shed some light? github.com/esp8266/Arduino/issues/1107
please do a video on MQTT protocol on multiple networks. i.e. if you have different esp8266 running in different subnets, how do you make them communicate using a single broker.
ACROBOTIC BTW I am working on it right now and for a single network it's working ok. but I'm unable to find a way to apply it in multiple subnets. anyhow, thank you for your concern. I'd appreciate if you do a video ASAP. 😊
The short answer is yes. For example, you could use a web-based IDE like Platform IO (docs.platformio.org/en/latest/platforms/espressif8266.html). If you want to build your own version it'd be difficult, but possible. Thanks for a great question!
Not directly programmed, but you can interact with it doing things like receiving/plotting data, and also controlling different components you plug to it. What did you have in mind?
Not directly programmed, but you can interact with it doing things like receiving/plotting data, and also controlling different components you plug to it. What did you have in mind?
can we give "ssid" and "password" to esp8266 using a webpage while esp is in AP mode. After rebooting the device it should automatically connect to that particular Access point with the credentials we have given before when esp8266 is on AP mode. i think this is possible with SPIFFS!
i success upload code in my esp module by ota. But, problem is i want to control modules which are attached in megaboard by using ota uploaded code. sorry my english is so bad. really i want to know :(
Ok, there are a few things that could be preventing the port from showing up. In the interest of thoroughness, please attempt the different suggestions on this thread, but using your current version of the IDE (1.8.8) and skipping the step of re-installing it: github.com/esp8266/Arduino/issues/2415 It’d be great if you could post the results, once you’ve figured out what was the cause. Also, ping me again if the issue remains! HTH.
thank you for your explain but unfortunately i can not found D1 ESP8266 in my arduino software please could you show me what should i do thank you so much could you send the code for connect the motion sensor with D1esp8266
Thnak you for your videos. I have question. how I can change SSID name and Password externally? I have a esp hadware and program. I want to send it my friends. I don't want them see my codes. But they must have access and update SSID name and Password.
Thank you very much for the video. It is a great demonstration. If I have a "ESP8266 Esp-01 Serial Wireless Wifi Transceiver Module" and an "Arduino Mega board", is there a way to connect them together so that I can upload new sketches to the Arduino board OTA? I bought this one: www.amazon.com/gp/product/B01EA3UJJ4/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 But they don't provide much info on how this could be connected to Arduino board so that I can upload new sketches over the air. Appreciate if you could point to some resource. Thank you!
You could but it's not trivial. You can wire the UART ports together (Tx and Rx), and have the ESP-01 write out the uploaded sketch to the Arduino Mega using Serial.write() (doc: www.arduino.cc/en/Serial/Write). Best of luck!
When I go to the serial monitor and press reset, this is what I get: ⸮txiR,h⸮⸮@>h⸮⸮⸮⸮⸮ Suggestions on what to do? Also, there are no wifi ports showing up, only COM4.
It's fine to get gibberish after reset (it is due to a different baud rate issue). See Pascal Lacsap's comment or read the description of the video for how to get the WiFi port to show up on Windows!
I used the exact code with the same board and get this error, can anyone help? ets Jan 8 2013,rst cause:2, boot mode:(3,7) load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d vbb28d4a3 ~ld Booting Connection Failed! Rebooting...
> I used the exact code with the same board Assuming this is a factually correct statement, then double-check your power supply. Otherwise, make sure that you haven't changed anything in the loop() function.
@@datasith Thank you for the quick response. I am using the laptop, plus I bought the same board. Here is what I have in the loop function: bool ota_flag = true; uint16_t time_elapsed = 0; void loop() { if(ota_flag) { while(time_elapsed < 15000) { ArduinoOTA.handle(); time_elapsed = millis(); delay(10); } ota_flag = false; } } and it is showing this in the monitor: Connection Failed! Rebooting... ets Jan 8 2013,rst cause:2, boot mode:(1,7) ets Jan 8 2013,rst cause:4, boot mode:(1,7) wdt reset Appreciate your help!
you can set a button to do that, changing the condition (ota_flag) to (digitalRead(buttonPin)) or combining them together, as : (ota_flag || digitalRead(buttonPin))
Hi Thanks for your videos .. I followed the process and upload via usb . I see in the ide the new ESP port but when I try to do the ota upload i get an error in the IDE saying "Cannot run Python.exe" . What have i missed ?? Regards Meir
Thanks for the kind words, Meir. On Windows you need to install Python. And, if it's already installed, make sure it's on the Windows path! www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/ Thanks for watching our vids!
ACROBOTIC: thanks I installed python 2.7 as I saw listed in other comments. One last question how can I ota with the password without pressing the reset as you showed. In final setup the esp will be installed in locations that will be difficult to access.
I love your videos. Show things others don't show. Not too long, but packed with information! Keep it up. Everyone who wants to get electronics - www.acrobotic.com - Just look through the site and you find inspiration for projects. Definetly your supplier for hobby electronics!
Thanks Timeo for the kind words! We also appreciate the shoutout to our site :) We'll keep working hard to make DIY electronics accessible and fun for anyone!
Yeah, well, that's just, like, your opinion, man 😂 More seriously, we agree that OTA is not very robust at the moment on the ESP8266, so if this is a critical feature for your project perhaps other boards are the way to go!
Outstanding trick.
Thanks again to you and the whole team providing these tutos.
May I share 2 issues I got with Windows_10 trying to implement the OTA.
1) Mdns capabilities thanks to Apple "Bonjour" software: little puzzled with all the download possibilities of the webpage given in the link.
In fact, one should pick "Print services for Windows".
Once downloaded,
don't run it: open it with WinZip or WinRar to just get Bonjour32.msi or Bonjour64.msi accordingly to the local systemThen, get to the firewall to authorize "Bonjour services" both private & public.
2) When trying to connect OTA, the arduino IDE stopped:
java.io.IOException: Cannot run program "python.exe": CreateProcess error=2.
It turned out that although installed on the computer, Python is not declared in window's path !
So, make sure that this point is ticked: if not, just fix it (how-to here :
www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/)
We owe you a drink! You're absolutely right, so thank you so much for the tips to improve the OTA process. We'll add them to the video description. In the future we want to repeat some videos for Windows users, and we'll definitely add this topic to the list!
thanks a lot - I faced same issues on Windows10. I had to restart PC to get Bonjour Service working. Firewall settings - important hint!
I used: support.apple.com/kb/DL999?viewlocale=en_GB&locale=en_GB
and I had to install python 2.7.10 as well (as per my research v.3.5.xx an above do not work with Arduino, so I installed 2.7.10) - while installing don't forget to add python to path variable (option to be set in install parameters)
Another great video! Thank you for sharing your knowledge with us. I like the calm and easy understandable style of your explanations!
For all beginners: Please do not forget that OTA-updates only work with ESP8266-boards with at least 8Mbit/1MByte memory. So this will not work with the ESP-01. You will get errors when trying to upload OTA. It took me hours to realize that :D
Thanks for the kind comment, and also for sharing your experience with us. We'll add your piece of knowledge to the video description!
Mine works without the additional ota flags. I just let ArduinoOTA.handle() be called inside the loop() along with my program. Great video! Thank you very much. :)
That's great! Thanks for the kind comments, for watching my video, and also for sharing the info!
I have found that if you have a lot going on in your code, or if you have delays, then it can be a little problematic. Best solution I have found is to use millis/previousmillis instead of delay(), and also make sure to define the esp8266 port. Even though it says it defaults to 8266, setting it in the code fixed a lot of issues for me (ie., "No response" errors). Also, if you program it over USB, be sure to do a hard power cycle or else OTA upload will error.
you are THE MAN
Iam SUPER new to arduino and i figured this out......NOT EASILY i might add LOL
But i figured it out, got everything automated and OTA working with BLYNK
making your code work with BLYNK code for a extreme beginner was VERY HARD
THANKS ALOT
i subscribed keep the good videos coming
haha, glad to hear Scott. it makes me super happy that some people find this stuff useful :)
Great video. The ESP8266 seems to be a versatile chip to use on standalone projects. Thanks!
Thanks for the kind words! Yeah the chip is great, and at an unbeatable price. We truly appreciate that you stopped by our channel!
Hello,
I am in the middle of this video and would like to share that the memory on ESP-01 is easy to update to 4Mbytes. :)
I found it on Instructables and it works great!
Thank you for your teaching work!
Hey, Mike. I really appreciate you sharing your knowledge. I hope others find it useful, thanks so much!
Cool videos!
I got two quick questions:
1) If I boot the ESP a month later and he change IP, the IDE will still find it?
2) Did you make the video about uploading firmware on webserver?
Thanks!
1) Yup
2) It's a work in progress
Thanks so much for watching, and for the kind words. We're glad you found the videos useful!
Once you flashed to OTA firmware in do you have to add that to every sketch you upload?
Yes, if you want to keep the OTA functionality. The minimal things you need are:
#include
#include
#include
char ssid[] = "xxxxx";
char pass[] = "xxxxx";
void setup() {
// Wi-Fi setup
ArduinoOTA.begin();
}
void loop() {
ArduinoOTA.handle(); // For OTA
}
Awesome tutorials. I enjoy your channel. EXCELLENT work.
Thanks for the kind words, we're glad you liked them!
thank you very much ..finally I got succeeded after trying lots of others videos...... thanks again
That's awesome! Glad to hear you found it useful :)
Thanks. Just what I was hoping to learn. Very well explained.
Thanks for the kind words! We're glad you found the content useful!
Very helpfull. Thx for youre affort!!
My Arduino IDE is not prompting me for a password if I uncomment out the password section. Everything works fine and I can update the Wemos OTA when no password is required. I'm getting an authentication error so the board is looking for a password, but I'm not getting a prompt to type one. Any ideas?
OK, I take it back and not it's working. Strange? Another question for ya, with the password on I'm not getting prompted for it if I use the webpage to put the board into update mode. So if I call "setflag" I can upload new code, but I don't get asked for a password? How come?
Glad it works. I think the password gets stored in your browser's session. Try incognito mode, and after logging in, try closing the old window and opening a new (incognito as well) one.
Thanks cool video!
Glad you liked it, thanks for watching!
Worked great for me.
THANKS!!
That's great to hear, thanks for watching!
I thank you so much, you taught me a lot of things I had couldn't find. Really nice tutorials :)
Thanks for the kind comments. It makes us happy that we're able to help awesome viewers like you!
@Thomas Cziesla: I did install Python 2.7 but when uploading from IDE the program compiles quickly, starts uploading and hangs forever. I'm using Mac with Sierra 10.13.3. Did I miss something?
Did you ever get this resolved, it seems your comment slip through the cracks and I never answered it (sorry!).
Excellent explanation. Thanks!
Thanks for the kind words, we're glad you liked it!
Excellent tutorial!!! I programed a generi esp6288 with , but is unable to program a D1 Mini. Please help!!
Great tutorial, well explained as usual! Will you be getting an ESP-32?
Thanks! Happy we're staying on track. We received a couple of ESP-32 demo boards from Espressif we're itching to showcase, and we also have our own development board that we want to demo. So many (awesome) things, so little time! 😂
Very well explained 👌
Thank you!
Great stuff... Well explained video of its kind.
However I had issue after uploading the Wifi boot loader.I couldn't see Wifi port even if I restart my Arduino IDE. This solution might help someone:
1. make sure your PC is on same wifi network as on which you configured your boot loader program.
2. if still doesn't works, go to preference > Network and turn off proxy , restart IDE.
3. if still doesn't works, make sure your Wifi network is not blocking some contents from Firewall (usually happens in Universities or restricted Wifi networks)
Thanks for sharing, Max!
Great tutorial man!
Thanks, Alvaro! Glad you liked it.
Hi! My Serial monitor shows IP address but no Network Port is getting generated like yours @5:40 . What did i do wrong? I only see serial port. Please help!
Are you on windows? If so, make sure you have Apple Bonjour installed (check out the comments/description section).
Very nice tutorial. Thank you. Did you ever post the video about using the web server to update the ESP8266? I can't seem to find it.
We have a few, if you mean across the internet check out this one: th-cam.com/video/6YAnqHTm7_o/w-d-xo.html. Thanks for watching!
Great Video, very good production Quality as always IMO!
But why didn't set time_elapsed = millis() and then in the while loop ask time_elapsed > (millis() - 15000) ?
Because what if your setup routine already takes up like 5 seconds? wouldn't you then have only 10 sec left for programming?
Thanks for the kind words :)
Yup you're absolutely right, the main reason we used 15sec was to account for cases where *setup()* takes a long time. Still, there could be cases in which it takes longer than 15sec and OTA wouldn't be available at all. It was meant as a quick-n-dirty demo of what's possible, but still using what you suggest would've been better!
Another note is that the OTA code only runs either when millis() rolls over (after ~49 days) or when the board resets. If we really want to avoid needing physical access to the board, we'd need to tie a GPIO to the RST pin, and establish a way (e.g., web server path) to trigger the board reset.
Or couldn't you just write a function which initializes the OTA code for a time of 20 secs and call it based on a web server request? This way you wouldn't waste one GPIO ;-)
Yup, exactly!
This was a great video! Thank you
I'm glad you enjoyed it, Peter. Thanks or watching!
Can we do this if the arduino and system is not connected to the same wifi
How to change the firmware of arduino uno which is connected to nodemcu through I2C or SPI ?
Will it be possible?
If possible please share the method.
Thank you
I'm not sure about I2C/SPI, but you can do it over Serial (Tx/Rx) using the Serial.read() and Serial.write() functions. HTH!
is that ip address assigned by the wireless router permanent?
Hello Cisco, great video, I have a question, is it true that we can connect a maximum of 4 esp8266 clients to an esp8266 web server??
Hey Anas, thanks for watching; we're glad you liked it!
In the past that's been true, however, there were plans to increase it. Poking around a bit I found the old thread where it was being discussed:
github.com/esp8266/Arduino/issues/570
HTH!
Hi, thnx alot, I went through the post, and the conclusion was that connecting more than 4 clients to an esp8266 server is possible, however, the connection will be very slow and inconsistent, but the final solution was to use a router as an AP, which in my case will cause a problem in case the wifi password was changed, because it would mean changing the password in every single client.
Wooooooooohhoooooooooo the OTA is crazy fast in uploading the sketch compared to serial via USB !!
Agreed! It's obviously more reliable to do it over USB, but gotta love the speed of OTA!
@@datasith yes the ota do sometimes fail.. and annoy a bit . But usb never fails. But ots helps when the devices are not in reach. I love the upload speed .
Great lesson, thanks. What if after you follow all of the steps and everything works OK you put the board in a place that is not easy to get to, like in a scrolling LED sign, and you want to OTA update the text how can you do it if the reset button on the board is not easy to get to?
Thanks for the kind words. Did you get a chance to watch my updated OTA video? It should help you with this question. Sorry about the late reply!
Hi! I have an ESP32. I'm using the library httpUpdate for OTA Updates. What is the difference between httpUpdate and ArduinoOTA? Thanks
Outside of a few function calls it should work just the same. Thanks for watching my videos!
While ota how to access serial terminal
Do you need python for this to run? I tried a few times and I'm getting error something like python cannot be run or something
Yup, you need Python installed on your computer. The explanation is in the first comment and the description of the video.
Dear what is different tywe3s vs esp8266 ?
I think Google is the best resource to answer that question, thanks.
I was just wondering today how to go about this. Thank you.
Glad the timing worked out just right! :)
ACROBOTIC I think a good tutorial would be how to use HTML to make Web pages that people can interact with
In my case, even a empty sketch uses over 50% program storage, what makes it impossible to upload a new sketch after one is running. Was there a change with the arduino surrounding?
I use the latest AtmelStudio with visualMicro and also tried with the latest Arduino IDE 1.8.5.
Do you guys have the same problem these days or do you have a idea what I am doing wrong? Thanks a lot.
Hey, Andreas. Thanks for watching! An empty sketch uses 246063 bytes, which means you have a board with only 512KB of flash (maybe an old ESP-01?). The simplest solution would be to use a different board-the SPI flash can go up to 16MB. Best of luck!
I have a ESP-12F but I combile with the Generic ESP8266 mode. So thats why my combiler shows me 51%. But with that in mind id should work with uploading a new sketch. Unfortunaly until now the ESP crashes after uploading a new .bin file. I will work a bit more on it the next days.
Thanks for your input, this clearyfies a lot to me.
@@Andreas-rt5sm are you the "man with the Accent"?
If so then I've seen your video on increasing memory on ESP-01 and I like it!
Regardless, your bin file is horking up your ESP, I've seen it before.
Good luck!
HI, Can you tell me why i am not getting the at command , but able to upload the program and wifi is also discoverable, at command is not coming any one can help to come out of this frustating issue
If you upload custom firmware to the ESP8266, you erase the "AT Commands" firmware. You can flash it back if you need to. Just know that Arduino firmware and AT Commands are different things. HTH!
Nice! But, what to do when the new board (with IP) is not showing up? === Problem solved!
I tried it for a i2c LCD
but it didn't work
there was a loop in the display program
inside the loop function in which you put your blink code
can you provide me a general code for i2c LCD 20X4 display with the basic OTA
thanks in advance
Sorry, with 13K subscribers, it's hard for me to write code for each one of you. Best of luck with the project!
Which video is the follow-up that shows how to do OTA without having access to remove power or press buttons?
It's still a work in progress :)
nice explanation :)
Thank you!
I was able to upload the OTA example without issue (without the blink code).
My ESP connected to Wifi network and gave me its IP address.
However, once I restart Arduino, impossible to find the ESP in my ports. Is there something I need to check on the IDE itself ?
The ESP is powered from a wall plug 2 meter away from the computer, both on the same network.
It's an ESP-12F module.
If anyone has an answer, that'd help a lot !
Short Question would this also work with an esp01
Yes it will, Daniel. Thanks for watching!
I have done this with Arduino IDE in Win 10.
It works as in the tutorial here.
Many viewers do not realize that the libraries allow the code to be transportable between devices.
Also be aware that serial monitoring takes a lot of resources; CPU and Memory.
I use conditional compilation to only use the print statements during code development.
What's the problem with leaving ArduinoOTA.handle() always in the loop without using the ota_flag variable?
ArduinoOTA.handle() is a small overhead method designed to be used in that way so that OTA is always available without the need to reboot the board.
Using the method increases the overhead compared to using the flag, small as it may be such difference. Thanks for bringing this up!
The overhead introduced by ArduinoOTA.handle() is just an IF statement.
The same overhead that you introduced with your ota_flag.
void ArduinoOTAClass::handle() {
if (_state == OTA_RUNUPDATE) {
_runUpdate();
_state = OTA_IDLE;
}
}
Hmm, it seems you didn't really have a question, so we wonder what was the point of original comment. In any case, we can get into compiler specifics, but we choose to defer the discussion for a later time.
My comment was a proposal for discussion and I thank you for your reply.
I use a similar method just to restrict the possibility of programming the board OTA to first 30 seconds after restarting the board without a need to use authentication. I thought that was the idea behind this video. Thanks for the video.
Thanks mate!
Thanks for watching, m8!
sir, it is not working in Ubuntu showing no answer after network port is formed
make sure you have mdns installed.
Hey I did exactly as you said but still I am unable to find OTA in Port. Presently I am using Windows 10 Intel i5, I tried to restart all but nothing worked. In serial port I am able to get IP address and I am able to turn on /off D1 pin using blynk application. Please help to resolve this.
Read the pinned comment.
@@datasith thanks
While uploading via IDE at the end of compilation I get the following warning: /Users/minimeccanica/Library/Arduino15/packages/esp8266/hardware/esp8266/2.3.0/tools/espota.py -i 192.168.20.25 -p 8266 --auth= -f /var/folders/76/qs6qrnvj51zbm30mmxxkdd1w0000gn/T/arduino_build_856966/trigBoardRelease_12_18_17.ino.bin".
Then the upload process hangs forever.
I do have Python installed (2.7), but something is going wrong.
Thx for any suggestion
Hmm, weird. We haven't seen this bug before, so it's difficult to debug. Maybe going through the OTA library issues on Github can shed some light?
github.com/esp8266/Arduino/issues/1107
very useful
Thank you!
hey brother you can connect the esp in arduino without using PC??? i mean upload the code in arduino cheap and then connect the esp in arduino
Yep, you can upload the code even if the ESP8266 is not connected to the PC as long as it's connected to your Wi-Fi network!
please do a video on MQTT protocol on multiple networks. i.e. if you have different esp8266 running in different subnets, how do you make them communicate using a single broker.
We're working on it right now, so keep an eye out for it in a couple of weeks!
ACROBOTIC BTW I am working on it right now and for a single network it's working ok. but I'm unable to find a way to apply it in multiple subnets. anyhow, thank you for your concern.
I'd appreciate if you do a video ASAP. 😊
Can this be done on the web page not in arduino ide?
The short answer is yes. For example, you could use a web-based IDE like Platform IO (docs.platformio.org/en/latest/platforms/espressif8266.html). If you want to build your own version it'd be difficult, but possible. Thanks for a great question!
Can the NodeMCU be programmed with MATLAB?
Not directly programmed, but you can interact with it doing things like receiving/plotting data, and also controlling different components you plug to it. What did you have in mind?
Not directly programmed, but you can interact with it doing things like receiving/plotting data, and also controlling different components you plug to it. What did you have in mind?
can we give "ssid" and "password" to esp8266 using a webpage while esp is in AP mode. After rebooting the device it should automatically connect to that particular Access point with the credentials we have given before when esp8266 is on AP mode. i think this is possible with SPIFFS!
Yup, and you don't even need to write your own, simply use WiFi Manager:
hackaday.com/2017/03/18/configure-esp8266-wifi-with-wifimanager/
ACROBOTIC
i success upload code in my esp module by ota. But, problem is i want to control modules which are attached in megaboard by using ota uploaded code. sorry my english is so bad. really i want to know :(
No worries about the english. you can connect the ESP and Megaboard using TX/RX and transfer the data using Serial.write()/Serial.read().
@@datasith can i transfer whole Code in ESP module to Megaboard ? Thanks for asking my question
Hello, please help. The network ports does not show up the arduino IP. Only COM ports. What did I do wrong? I update the latest Arduino 1.8.8 version.
Try restarting the app. What operating system are you using?
@@datasith Restart many times. Never seem to works since I install the app on Windows 10 professional on Intel PC i-7.
Ok, there are a few things that could be preventing the port from showing up. In the interest of thoroughness, please attempt the different suggestions on this thread, but using your current version of the IDE (1.8.8) and skipping the step of re-installing it: github.com/esp8266/Arduino/issues/2415
It’d be great if you could post the results, once you’ve figured out what was the cause. Also, ping me again if the issue remains! HTH.
Any luck?
I am using Windows 10 Prof. I install python as needed. Still ports does not show up. I can ping the board just fine. What did I miss?
doesn't work i get a bunch of java errors
thank you for your explain but unfortunately i can not found D1 ESP8266 in my arduino software
please could you show me what should i do
thank you so much
could you send the code for connect the motion sensor with D1esp8266
Try following our tutorials from the first video:
th-cam.com/video/G6CqvhXpBKM/w-d-xo.html
Thanks for watching!
go to Arduin0/hardware/espressif/esp8266/tools and run the espota script
Will it work on Linux ?
Yup!
Thnak you for your videos.
I have question.
how I can change SSID name and Password externally?
I have a esp hadware and program.
I want to send it my friends.
I don't want them see my codes.
But they must have access and update SSID name and Password.
Check out the WiFiManager library! Thanks for watching!
Cisco when I dumped the code into the board and I typed the password but it is not uploading please check it once!
Is the board listed as one of the options in the Tools menu?
Thanks for your tutorial, but you forgot to mention that Python is also needed to be installed on your PC.
Thanks for the tip. It's the perils from only doing the video on Mac OSX. Thanks for watching!
@@datasith If I'm on mac I should be fine then?
After uploading the code the port is not in the tool
make sure you install apple bonjour (see pinned comment). hth!
@roy douce: have a look at Andreas Spiess #110, may be he had an original idea to overcome accessibility problem
Thanks so much for sharing!
Thank you very much for the video. It is a great demonstration. If I have a "ESP8266 Esp-01 Serial Wireless Wifi Transceiver Module" and an "Arduino Mega board", is there a way to connect them together so that I can upload new sketches to the Arduino board OTA? I bought this one: www.amazon.com/gp/product/B01EA3UJJ4/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
But they don't provide much info on how this could be connected to Arduino board so that I can upload new sketches over the air. Appreciate if you could point to some resource. Thank you!
You could but it's not trivial. You can wire the UART ports together (Tx and Rx), and have the ESP-01 write out the uploaded sketch to the Arduino Mega using Serial.write() (doc: www.arduino.cc/en/Serial/Write). Best of luck!
When I go to the serial monitor and press reset, this is what I get:
⸮txiR,h⸮⸮@>h⸮⸮⸮⸮⸮
Suggestions on what to do?
Also, there are no wifi ports showing up, only COM4.
It's fine to get gibberish after reset (it is due to a different baud rate issue). See Pascal Lacsap's comment or read the description of the video for how to get the WiFi port to show up on Windows!
How to enable ota port in ide?
By following this video, also look at the pinned comment and video description. Thanks for watching.
ACROBOTIC im sorry for the confusion i meant the ota programming/uploading method
If the upload fails at 0% the firewall on your computer is blocking the ESP from downloading the file.
Thanks for sharing, Harvey!
I used the exact code with the same board and get this error, can anyone help?
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld
Booting
Connection Failed! Rebooting...
> I used the exact code with the same board
Assuming this is a factually correct statement, then double-check your power supply. Otherwise, make sure that you haven't changed anything in the loop() function.
@@datasith Thank you for the quick response. I am using the laptop, plus I bought the same board. Here is what I have in the loop function:
bool ota_flag = true;
uint16_t time_elapsed = 0;
void loop() {
if(ota_flag)
{
while(time_elapsed < 15000)
{
ArduinoOTA.handle();
time_elapsed = millis();
delay(10);
}
ota_flag = false;
}
}
and it is showing this in the monitor:
Connection Failed! Rebooting...
ets Jan 8 2013,rst cause:2, boot mode:(1,7)
ets Jan 8 2013,rst cause:4, boot mode:(1,7)
wdt reset
Appreciate your help!
How to program it without resetting
you can set a button to do that, changing the condition (ota_flag) to (digitalRead(buttonPin))
or combining them together, as : (ota_flag || digitalRead(buttonPin))
Did you see my latest video on OTA, I show a different way where you don't need a button. I set a route that you access to reset the board.
"Corona" in his shirt
cool
Thank you!
Hi Thanks for your videos .. I followed the process and upload via usb . I see in the ide the new ESP port but when I try to do the ota upload i get an error in the IDE saying "Cannot run Python.exe" .
What have i missed ??
Regards
Meir
Thanks for the kind words, Meir. On Windows you need to install Python. And, if it's already installed, make sure it's on the Windows path!
www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
Thanks for watching our vids!
ACROBOTIC: thanks I installed python 2.7 as I saw listed in other comments. One last question how can I ota with the password without pressing the reset as you showed. In final setup the esp will be installed in locations that will be difficult to access.
I love your videos. Show things others don't show. Not too long, but packed with information! Keep it up.
Everyone who wants to get electronics - www.acrobotic.com - Just look through the site and you find inspiration for projects. Definetly your supplier for hobby electronics!
Thanks Timeo for the kind words! We also appreciate the shoutout to our site :) We'll keep working hard to make DIY electronics accessible and fun for anyone!
This OTA is useless and uncomfortable guys need to start developing OTA like on the roborio from FIRST
Yeah, well, that's just, like, your opinion, man 😂
More seriously, we agree that OTA is not very robust at the moment on the ESP8266, so if this is a critical feature for your project perhaps other boards are the way to go!