Using DartLang for serial communication

I want to use DartLang to communicate with Arduino via Serial Port, and not through TCP / ip. I found the DartLang chrome package and the Chrome Serial link , is this a solution? Or is there another solution for using Serial Port with DartLang?

+5
source share
1 answer

Nicolas Francois built his own Dart VM extension that does this:

https://github.com/nfrancois/SerialPort

You will need to compile it yourself ( gcc , make , pub is required):

There is not much information on how to use it, but there are some tests and a dart class that should be useful:

It looks like you would use it something like this:

 var serial = new SerialPort(dummySerialPort.path); serial.onRead.listen((s) => print('Got: $s')); serial.open() .then((_) => serial.write("Hello")) //.then((_) => serial.close()); 
+4
source

Source: https://habr.com/ru/post/1200607/


All Articles