Home / Snippets / Increasing the length of Serial Buffer in Arduino

Increasing the length of Serial Buffer in Arduino

While communicating with serial devices via Arduino, sometimes Arduino do not receive or send complete messages, especially when we communicate with LCDs or with GSM. While reading SMS via GSM Module, Arduino does not retrieve complete message because Serial buffer is full as the buffer length of Arduino is limited to 64 bytes only.

To increase buffer size or length of Arduino, there is a simple solution:
Follow these steps:
1. Go to “arduino\hardware\arduino\avr\cores\arduino”
2. Edit “HardwareSerial.cpp” in Notepad
3. Search for “#define SERIAL_BUFFER_SIZE 64”
4. Change it to “#define SERIAL_BUFFER_SIZE 256”
5. Save and enjoy!!

View of File:

Arduino Serial Buffer

How to change Serial Buffer Size of Arduino:

Check Also

Interfacing ADXL345 Accelerometer with Arduino UNO/ Mega

Interfacing Accelerometer ADXL345 (GY-291) with Arduino UNO/ Mega

Interfacing Accelerometer ADXL345 (GY-291) with Arduino UNO/ Mega Accelerometer ADXL345 is a 3-dimensional accelerometer, that …

3 comments

  1. I like the valuable information you provide in your articles. I’ll bookmark your weblog and check again here frequently. I am quite certain I’ll learn lots of new stuff right here! Good luck for the next!

  2. Hi to all, the contents existing at this website are genuinely amazing for people knowledge,
    well, keep up the good work fellows.

  3. We’re a group of volunteers and opening a new scheme in our
    community. Your site offered us with helpful information to work on. You’ve performed a
    formidable process and our whole community will probably be thankful to you.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: