Data From Digital Scale With Arduino

Hi, I want to ask, I have an arduino with max3232 rs232 to ttl connected to MKCells Di03 digital scales. I tried first with teraterm and received data as in the following picture.

Then I tried using arduino with the following coding

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11);  // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  mySerial.begin(9600);
  Serial.println("Hello, world");
}

void loop() {  // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

And the data displayed on the serial monitor looks like this

In the weighing data above, every time there is new data he does not make a new line but continues sideways and for some reason I see in the arduino serial monitor there are additional characters that I don't know at the beginning and end of the weighing data. how do I retrieve the data so that it can be for example +00005011> to 5.0 or +00015511; to 15.5 ?

What instructions do you use to print on the monitor?

Please make sure you are posting matching code and monitor output

Yes the code above is the code I used, it just changed the setup from serial.println(“Goodnight moon!”) to serial.println(“Hello, Word”).
Then if what is drawn is in the serial monitor why can there be 3 lines of weighing data because previously I reset the arduino with the button on the arduino.

It seems to me that although there is some variation in separation characters ( : > or ? ) the reading is always preceded by a + sign
image
so you can use this as a flag.
When you recognise this you can take the next 8 characters and convert them to either a LONG in milligrams (presumably) or a float in grams or kilograms, whatever.

Hello lypus

Switch the terminal programme so that the datagram is presented in hexadecimal representation to determine the start and end characters.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.