Web Güncelleme Sayfası Barındırın
Üretici yazılımını bir tarayıcı formundan yükleyin.
Web Güncelleme Sayfası Barındırın, CoddyKit'te ücretsiz bir Arduino & IoT Academy dersidir. Bu, 4 dersinin 3. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Arduino & IoT Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Arduino & IoT Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Update From a Browser
Sometimes you want to flash a device without the Arduino IDE at all. A web update page lets anyone upload firmware from a browser.
The Board Becomes a Server
Your ESP32 runs a tiny web server that serves an upload form, so a phone or laptop can send it a new binary.
Bring In the Libraries
You combine a web server with the Update library, which knows how to write incoming bytes into flash memory.
#include <WebServer.h>
#include <Update.h>
WebServer server(80);Serve an Upload Form
The root page returns a simple HTML form with a file picker and a submit button for the firmware file.
server.on("/", []() {
server.send(200, "text/html",
"<form method='POST' action='/update' enctype='multipart/form-data'><input type='file' name='fw'><input type='submit'></form>");
});Where Did .bin Come From?
In the IDE, Sketch then Export Compiled Binary creates the .bin file you will pick in that upload form.
Open the Update Stream
When the upload starts, you tell the chip how big the image is so Update.begin() can reserve flash space for it.
Update.begin(UPDATE_SIZE_UNKNOWN);Write the Incoming Chunks
Firmware arrives in pieces. You feed each chunk to Update.write() as it lands, building the new image in flash.
Update.write(upload.buf, upload.currentSize);Finish and Verify
When the last byte arrives, Update.end(true) checks the image is complete and valid before marking it ready to boot.
if (Update.end(true)) Serial.println("Update OK");Reboot Into New Code
A successful update needs a fresh start. Call ESP.restart() so the board boots into the firmware you just uploaded. 🔄
ESP.restart();Guard the Page
Anyone who reaches this page can reflash your device, so add a login or token check before accepting any upload.
Keep the Server Alive
Just like OTA, the web server needs attention. Call server.handleClient() in loop so it can accept the upload request.
void loop() { server.handleClient(); }Quick Check
Think about which library actually writes firmware to flash.
Recap
Run a web server that serves an upload form, feed the .bin to the Update library, verify it, then restart, all guarded behind a login. 🌐
Sıkça Sorulan Sorular
“Web Güncelleme Sayfası Barındırın” dersi ücretsiz mi?
Evet — “Web Güncelleme Sayfası Barındırın” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Arduino & IoT Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Arduino & IoT Academy kursu toplamda 4 dersten oluşur.
“Web Güncelleme Sayfası Barındırın” dersinde ne öğreneceğim?
Üretici yazılımını bir tarayıcı formundan yükleyin. Arduino & IoT Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Arduino & IoT Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Arduino & IoT Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 3. dersidir.
“Web Güncelleme Sayfası Barındırın” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Arduino & IoT Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Arduino & IoT Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- OTA Sahada Neden Önemlidir
- ArduinoOTA'yı Etkinleştirin
- Web Güncelleme Sayfası Barındırın
- Hatalı Güncellemeyi Geri Alın