Notifications
Clear all

OTA to update programs/sketches

3 Posts
2 Users
0 Likes
215 Views
queenidog
(@queenidog)
Eminent Member
Joined: 3 years ago
Posts: 20
Topic starter  

I have MKR1000, ESP8266, even an Arduino UNO WIFI,but for the life of me I can't do a download from computer to MCU over wifi.  I have outside displays that require occasional tweaking so I have to hook up a USB cable to computer and download.  Easy peazy.  I want to do it wireless because of weather and the fact that displays are all "buttoned up".  I can control the LED of an MKR via IP address, using example programs in the library.  How can I download an entire sketch?   I don't need a fancy IOT gui to control anything, just a portal to send my data too.  I spend tons of time trying HC-05 Bluetooth devices, the cleanest and looks-like-easiest way to get the job done but I cannot make it work, even considering the DTR issue where the receiving UNO requires a Reset before uploading code on it's serial connections.  I have watched many YouTube videos, read tutorials, but NO ONE has been able to show me how to download (via wifi, RF, Bluetooth, or ESP (ha ha),  the "Blink" sketch from Arduino.

Anyone?   Bill?  When are you going to do an OTA tutorial?


   
Quote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

I would not use Bluetooth, just too unreliable. You seem to be talking about 2 different things. The first is updating the software running on the device, you can do that the normal way but want the ability to do that OTA. The second thing you talk about is controlling a LED (I assume over WiFi) and that is totally different.

You seem to be most concerned with the OTA sketch update capability. The official Arduino documentation discusses that at the following site, see if thqt  solves your problem.

https://www.arduino.cc/reference/en/libraries/arduinoota/

As far as retrieving data, or manipulating the board, WiFi is the best approach, you may need both a web server and a web client on the board depending on what you want to accomplish, there are thousands of examples of that. Good Luck

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

Here is another example

https://randomnerdtutorials.com/esp8266-ota-updates-with-arduino-ide-over-the-air/

and one more

https://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote