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 ?
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
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.