• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Issue with RS232

Q&A Forum › Category: Arduino › Issue with RS232
0 Vote Up Vote Down
wael elsisi asked 1 week ago

Would you mind helping me with this issue?

I bought RS232 sheild.When I use it in my project… the message from device over RS232 to Arduino not completely appears..just 63bit while the whole messge is about 120byte.
When I turn on the device The only first message be fully send ,while when send it again it ,the message the partial of it be sent .

3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 7 days ago

Hi.
I never tried using a R232 shield or module before.
But, if you share your code, I might try to take a look..
Regards,
Sara

0 Vote Up Vote Down
wael elsisi answered 7 days ago

thank you so much.
this is the part that handle data from RS232 .

void handleRS232Data() {
while (rs232.available()) {
char c = rs232.read();
lastRS232Char = millis();

if ((c >= 32 && c 0) {
Serial.println(“RS232: Received 0 && lastRS232Char > 0) {
if (millis() – lastRS232Char > 200) {
Serial.println(“RS232: Received 250) {
Serial.println(“RS232: Received <- " + rs232Buffer);
Serial.println("WARNING: Buffer overflow protection triggered");
rs232Buffer = "";
lastRS232Char = 0;
}
}

0 Vote Up Vote Down
Sara Santos Staff answered 5 days ago

Hi.
Your code seems alright.
Have you tried decreasing the time between characters? For example, 50 instead of 200?


if (millis() – lastRS232Char > 50) {

 
 
Since that sensor uses Serial communication, you can take a look at our tutorial and see if there are any tips or sections of code that you can improve based on our examples:

ESP32 UART Communication (Serial): Set Pins, Interfaces, Send and Receive Data (Arduino IDE)


 
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Smart Home with Raspberry Pi, ESP32, and ESP8266 V1.6 September 9, 2025
  • [eBook Updated] Learn LVGL: Build GUIs for ESP32 Projects – Version 1.5 July 7, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.