Anniversary Sale · up to 80% off all librariesEnds Nov 9Shop now
SOFTTDocs

Examples

Example sketches in the WebSerial repository that demonstrate standard, access point, high-performance and logging setups.

The WebSerial repository includes four example sketches. Each one builds on the setup described in the Integration Guide. WebSerial Pro ships the same four examples, using WebSerialPro.h.

Available examples

ExampleDescription
DemoThe standard integration. Connects to an existing Wi-Fi network, prints the IP address, uptime and free heap every 2 seconds, and echoes received messages. Suitable for most use cases.
Demo_APSame as Demo, but starts the board as an access point (SoftAP) instead of connecting to an existing network. Use it to connect to the device directly.
HighPerfSends more than 20 messages per second. When built with WSL_HIGH_PERF, it writes directly into the WebSocket message buffer with makeBuffer() and send(). See High Performance Mode.
LoggingStreams log lines to the terminal. Calls setBuffer() so that line-oriented print(), println() and printf() calls can be used in High Performance Mode.

All examples are available in the examples folder of the repository. In the Arduino IDE, you can also open them from File > Examples after installing the library.

On this page