mathieucarbou / WebSerialLite

Super lightweight web serial monitor for ESP32
https://oss.carbou.me/WebSerialLite/
GNU General Public License v3.0
5 stars 0 forks source link

WebSerialLite

License: LGPL 3.0 Continuous Integration PlatformIO Registry

WebSerial is a Serial Monitor for ESP32 that can be accessed remotely via a web browser. Webpage is stored in program memory of the microcontroller.

This fork is based on asjdf/WebSerialLite.

Changes in this fork

To add a logo, add a handler for /logo to serve your logo in the image format you want, gzipped or not. You can use the ESP32 embedding mechanism.

Preview

Preview

DemoVideo

Features

Dependencies

Usage

  WebSerial.onMessage([](const String& msg) { Serial.println(msg); });
  WebSerial.begin(server);

  WebSerial.print("foo bar baz");

If you need line buffering to use print(c), printf, write(c), etc:

  WebSerial.onMessage([](const String& msg) { Serial.println(msg); });
  WebSerial.begin(server);

  WebSerial.setBuffer(100); // initial buffer size

  WebSerial.printf("Line 1: %" PRIu32 "\nLine 2: %" PRIu32, count, ESP.getFreeHeap());
  WebSerial.println();
  WebSerial.print("Line ");
  WebSerial.print(3);
  WebSerial.println();