Hi All, I have a project that need to read scale data via RS232. normal RS232 is bit complicated to use via MAX232 module. therefore I am planning to use module, m5-docs
I have not yet purchased it, But I am about to based on this thread.
Can someone help me on this device how to code via Arduino. and is it similar to normal Rs232 module ( which Im struggling to get data.)
I moved your topic to an appropriate forum category @yeshantcc .
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
I think that that also needs a processor board; I'm not familiar with the M5Stack. The page that you linked contains a link to an Arduino example.
No idea; I have the feeling that you will encounter the same problems. You might be better off giving a description of what you have tried (which board, connection diagram, code).
"normal RS232 is bit complicated to use via MAX232 module"
I tried to explain that, I trying to read scale data via RS232
SCALE -> Rs232 port -> MAX232 module -> Arduino uno -> PC
I have a project where I need to control a relay based on scale data. I’m planning to use an Arduino Uno or Mega to read the scale's output. However, after trying several types of scales and RS232 converter modules, I haven't been successful. I'm now willing to start over and would greatly appreciate help from the Arduino FORUM. If anyone has already completed a similar project, I’m ready to purchase the exact same scale and module, and use the provided code. The only requirement is that the scale should have a capacity of up to 30kg.
I got TX1000 scale reader and T66 load cell with Arduino with this code
#include <SoftwareSerial.h>
SoftwareSerial mySerial(0,1); //SRX, STX
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
}
void loop()
{
if(mySerial.available()>0)
{
byte x = mySerial.read();
Serial.println(x);
}
}
2) I have this scale -
chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/http://www.gandg.com.cn/en/tbc258_upfile/2021281510824740.pdf 2
which is inbuilt Rs232 output port.
```#include <SoftwareSerial.h>
SoftwareSerial SUART(6, 7);
void setup() {
Serial.begin(9600);
SUART.begin(9600);
}
void loop() {
char inData[21]; // Allocate some space for the string
char inChar; // Where to store the character read
byte index = 0; // Index into array; where to store the character
SUART.print('A'); //sending A using SUART port
byte n = SUART.available();
if (n != 0) {
if (index <20) // One less than the size of the array
{
inChar = SUART.read(); // Read a character
inData[index] = inChar; // Store it
index++; // Increment where to write next
inData[index] = '\0'; // Null terminate the string
}
}
//Serial.println(inData );
delay(1000);
}
I dont have too much time to work on the code, it should be easy but byte receiving from the scale are hard to read via code. This project needs to finish asap. so I was expecting if someone has alerady completed it, I can purchase the same scale and module for the code
I have not cross posted. this is a different problem Im facing. related to same issue im facing, but different module, different code. Plan was not to jumble the situation.