altera2015 / usbserial

Flutter Android USB Serial plugin
BSD 3-Clause "New" or "Revised" License
124 stars 83 forks source link

Convertion of results #14

Closed gillestasse closed 5 years ago

gillestasse commented 5 years ago

I am not sure it is the right place to ask for such a question but I am struggling to for 2 days to manage to read the results coming from a usb device.

I manage to get the connection and I get the inputStream but I cannot find a way to get the data.

If i convert the stream to string I get : [255,0,0,0,255....]

If I try to use:

newTag = new String.fromCharCodes(asyncSnapshot.data);

I get a string but with not the correct results something like YYYYYY, my string should be a number (12528548654213).

If i try to use :

newTag = ascii.decode(asyncSnapshot.data).trim();

I get an error

format exception invalid format exception : 255

altera2015 commented 5 years ago

Not quite the right spot. Try https://stackoverflow.com/ or https://groups.google.com/forum/#!forum/flutter-dev