hidapi_dart 0.0.5
hidapi_dart: ^0.0.5 copied to clipboard
This package is a thin layer of ffi interface to hidapi library. Built for communiating with hid devices.
example/example.dart
import 'dart:io';
import 'package:hidapi_dart/hidapi_dart.dart';
void main() async {
var hid = HID(idVendor: 0x0001, idProduct: 0x0001);
if(hid.open() < 0) {
stdout.writeln('HID Device open failed!');
return;
}
await hid.write("\x01\x01a");
String str = await hid.read();
stdout.writeln(str);
hid.close();
}