signal_viewer_serial

Pub Version

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, and adds a Cyton menu for its channel settings, test signals, electrode impedance, markers and SD card recording. Channels used for EMG or other signals are shown in tabs of their own. CytonSdProvider opens the recordings that the Cyton writes to its SD card, converting them to XDF as they are read.

API documentation

Installation

flutter pub add signal_viewer signal_viewer_serial

Usage

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) and OpenBCI Cyton boards as live streams; CytonSdProvider opens the Cyton's SD card recordings.