flutter_libserialport
flutter_libserialport copied to clipboard
Example or tutorial needed
First of all thank you for this package.
Would like to know if it's possible to have an example for reading data from a serial port using flutter.
My goal is to use the serial port on an Android Set Top Box (N1 Max) capable of reading data from Arduino.
Yes, you are absolutely right that there should be better examples. Do you have a suggestion for what the examples could read and write? The typical problem with serial port examples - should one assume dummy echoes, a certain protocol, or something else? :) Anyway, one option could be to adapt/port the dummy examples from libserialport.
This is a Flutter component, so some example with widgets and business logic would be very useful:
A typical read and write from/to Arduino for exampe... And eventually a complete example (in the example folder) that shows how:
- Configure the port (velocity, parity, ...)
- Select the port from a dropdown
- A button to connect
- If success start to listen to the serial port, if you receive a string show the string in a list
- If error, shows an error (and eventually retry to connect after a while)
- a text field + a button to send a string to Arduino
@dariocavada You could see this site for more examples. It is same. https://pub.dev/packages/dart_serial_port