I am able to connect and send data to arduino but I don't know how I can received data from arduino. Please help me.
I am using flutter_bluetooth_serial package
Send message to arduio code here:
Future<bool> sendMessage(String text) async {
if (connected != false) {
//await connectToBluetooth();
text = text.trim();
connection!.output.add(Uint8List.fromList(utf8.encode(text + "\r\n")));
await connection!.output.allSent;
return true;
} else {
return false;
}
}