signal_viewer_serial

Serial devices for signal_viewer.

SerialStreamProvider reads lines of numbers from a serial port and shows them as a live stream, one tab per device. This is the output of a typical Arduino sketch that prints sensor values. Values may be separated by commas, semicolons, tabs or spaces, and a header line or name:value pairs give the channel names. The provider also connects to an OpenBCI Cyton through openbci_cyton.

import 'package:signal_viewer/signal_viewer.dart';
import 'package:signal_viewer_serial/signal_viewer_serial.dart';

Future<void> main(List<String> args) => runSignalViewer(
  args,
  config: const ViewerConfig(title: 'My viewer', heading: 'My viewer'),
  providers: [SerialStreamProvider()],
);

Ports come from serial_transport on Linux, macOS, Windows and the web (WebSerial). On other platforms an application passes its own SerialPortProvider to the SerialStreamProvider constructor. LSL Viewer does this for USB serial devices on Android, in serial_ports_io.dart.

Libraries

signal_viewer_serial
Serial devices for signal_viewer: SerialStreamProvider reads lines of numbers from serial ports (e.g. an Arduino) as live streams.