+
+
+
+
diff --git a/docs/en/api/usb.rst b/docs/en/api/usb.rst
index 94261185f61..056e3fcc1ae 100644
--- a/docs/en/api/usb.rst
+++ b/docs/en/api/usb.rst
@@ -303,7 +303,7 @@ This function is used to get the ``webUSBURL``.
const char * webUSBURL(void);
-The default ``webUSBURL`` is: https://espressif.github.io/arduino-esp32/webusb.html
+The default ``webUSBURL`` is: https://docs.espressif.com/projects/arduino-esp32/en/latest/_static/webusb.html
enableDFU
^^^^^^^^^
diff --git a/libraries/USB/examples/USBVendor/USBVendor.ino b/libraries/USB/examples/USBVendor/USBVendor.ino
index a2b236d8f10..350c532b50d 100644
--- a/libraries/USB/examples/USBVendor/USBVendor.ino
+++ b/libraries/USB/examples/USBVendor/USBVendor.ino
@@ -164,7 +164,8 @@ void setup() {
USB.onEvent(usbEventCallback);
USB.webUSB(true);
- USB.webUSBURL("http://localhost/webusb");
+ // Set the URL for your WebUSB landing page
+ USB.webUSBURL("https://docs.espressif.com/projects/arduino-esp32/en/latest/_static/webusb.html");
USB.begin();
}
@@ -176,9 +177,11 @@ void loop() {
if (buttonState == LOW) {
Serial.println("Button Pressed");
Vendor.println("Button Pressed");
+ Vendor.flush(); //Without flushing the data will only be sent when the buffer is full (64 bytes)
} else {
- Vendor.println("Button Released");
Serial.println("Button Released");
+ Vendor.println("Button Released");
+ Vendor.flush(); //Without flushing the data will only be sent when the buffer is full (64 bytes)
}
delay(100);
}
@@ -188,6 +191,7 @@ void loop() {
uint8_t b[l];
l = Serial.read(b, l);
Vendor.write(b, l);
+ Vendor.flush(); //Without flushing the data will only be sent when the buffer is full (64 bytes)
}
}
#endif /* ARDUINO_USB_MODE */
diff --git a/libraries/USB/examples/USBVendor/index.html b/libraries/USB/examples/USBVendor/index.html
new file mode 100644
index 00000000000..23831bb4582
--- /dev/null
+++ b/libraries/USB/examples/USBVendor/index.html
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+ Espressif WebUSB Console Example
+
+
+
+
+
+
+