Arduino Serial Plotter: https://github.com/arduino/arduino-serial-plotter-webapp
Arduino Serial Plotter uses WebSockets to communicate by sending or receiving commands.
Requirements:
- Node v10
git clone https://github.com/arduino/arduino-serial-plotter-webapp
# or when using ssh:
# `git clone [email protected]:arduino/arduino-serial-plotter-webapp.git`
cd arduino-serial-plotter-webapp
npm i && npm start
Default port: 3000
The Arduino Serial Plotter will send a request to our CLI and the CLI is waiting for a connection on the websocket, this is why you need to open the arduino plotter app after starting the CLI:
http://localhost:3000
(with default port 3000)
By default, the examples will run at trace
log level for the tracing
subscriber, however, you can use the RUST_LOG
env. variable to override it.
Running the minimal
example will give you the most basic use of the crate
but it will not be able to send data or handle change of End of Line messages
from the Arduino Serial Plotter application.
cargo run --example minimal
You can use run
example for a basic usage of the Client and Server:
cargo run --example run
Refer to the documentation in the file for more details.
The example does all the basic main functionality that you need and sends
random data to the arduino-serial-plotter-webapp
:
- Sends initial settings
- Sends Random data with 2 different data lines
- Receives settings from the Arduino Serial Plotter and confirms a new End of Line by sending a settings message back to it
- Receives data messages sent from the Arduino Serial Plotter UI and logs them using
tracing
to the console
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.