Trying to get the weight from the weighing scale through a port connected to a USB that's connected to my android phone. The data is coming through but I don't know how to convert it properly. This is the code I'm currently using to convert the data:
try {
String data = new String(arg0, "UTF-8");
if (mHandler != null)
mHandler.obtainMessage(MESSAGE_FROM_SERIAL_PORT, data).sendToTarget();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
This is what I'm currently getting:
The number 14700t
was supposed to show on the textview
.