I am trying to make a moving message board using an Arduino Uno, HC-05 Bluetooth module and DMD board. Sending message to the DMD through the Bluetooth module can only give a not more than 62 character message. I need help in what to do to get up to 200 or more. Thanks.
First: There is no such concept of a message on the Serial bus, unless you implement it yourself. On hardware level only individual bytes are transmitted, and you don't even know, when each byte will be transmitted exactly. Since there are only individual bytes in the first place, there is no limitation on how many bytes can be transmitted.
Serial library has a limited buffer of 64 bytes, but as Majenko wrote it is not intended for buffering all bytes for one of your messages. It should only buffer the bytes, until the main sketch can read them from the buffer. On reading the bytes will be removed from the buffer, leasing buffer space for new characters.
The buffer size of the
Serial library can be increased by changing the numbers in
HardwareSerial.h in the following lines
#define SERIAL_TX_BUFFER_SIZE 64 #define SERIAL_RX_BUFFER_SIZE 64
But this is not really the solution to your problem. When first filling the buffer and then read the whole message you just arbitrarly constrain yourself to a insufficient solution.
Instead of waiting for all the messages bytes (and finally filling up the buffer) you should steadily check, if new bytes are available and then load them into your own buffer. You can use a delimiter byte to mark the end of a message, mostly "\n" (newline character) is used for this. Copy the bytes into your own buffer, until you read the delimiter byte. Then use the message as a whole for your application. Don't forget to clear your buffer afterwards.
The examples for the
Serial library, especially the
SerialEvent example show how to do this in your code.
The software from the transmitter can break the text you want to send into pieces of 62 characters in length and send them one by one. The receiver will save the most recent piece in a String and join it with a another String which will be storing the whole message. If you don't mind it being a little bit slower, then this is the solution for you