dart_serial_port 0.0.1+2 copy "dart_serial_port: ^0.0.1+2" to clipboard
dart_serial_port: ^0.0.1+2 copied to clipboard

discontinuedreplaced by: libserialport
outdated

Serial Port for Dart (FFI bindings to libserialport, a minimal C-library created by the sigrok).

Serial Port for Dart #

pub license: LGPL3+

Serial Port for Dart is based on libserialport, which is a minimal C-library created by the sigrok projects, and released under the LGPL3+ license.

Usage #

import 'package:dart_serial_port/dart_serial_port.dart';

final name = SerialPort.availablePorts.first;
final port = SerialPort(name);
if (!port.openReadWrite()) {
  print('${SerialPort.lastErrorMessage} ${SerialPort.lastErrorCode}');
  exit(-1);
}

port.write(/* ... */);

final reader = SerialPortReader(port);
reader.stream.listen((data) {
  print('received: $data');
});

To use this package, add dart_serial_port as a dependency in your pubspec.yaml file.

18
likes
0
pub points
55%
popularity

Publisher

unverified uploader

Serial Port for Dart (FFI bindings to libserialport, a minimal C-library created by the sigrok).

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

ffi

More

Packages that depend on dart_serial_port