Dear PJRC community,
I am working on a project that embeds multiple methods, most of them are configurable. This processing methods are used in conjunction of acquired sensor measured data, in order to "adjust" this methods, I would need to transfer the required configuration using the USB port and a PC that is connected to the teensy, the same port used to modify the firmware with the Serial interface (not the Hardware Serial ports)
The first attempt worked properly, I send a .JSON string trough the USB, and using ArduinoJSON library I am able to receive and to parse it properly. My problem comes when this .JSON string gets longer than 150bytes, in such case, the .JSON input its truncated, then deserializeJson function fails, returning the IncompleteInput method. ArduinoJSON support webpage recommended to increase the timeout or increase the buffer size. (Increasing timeouts have not worked)
I have found that there are some methods in Teensy 4 to add buffer memory, but those apply only for the hardware serial ports, not the port I need (USB Serial).
I have also found another web where they modify the Arduino core to increase the buffer size:
https://www.hobbytronics.co.uk/arduino-serial-buffer-size
Could you please suggest a solution, so I can increase the buffer size in the USB Serial port of the Teensy 4.0?
Do you know any alternative lighter to send multiple variables through the USB without usage of JSON format?
Thanks in advance for your collaboration.
I am working on a project that embeds multiple methods, most of them are configurable. This processing methods are used in conjunction of acquired sensor measured data, in order to "adjust" this methods, I would need to transfer the required configuration using the USB port and a PC that is connected to the teensy, the same port used to modify the firmware with the Serial interface (not the Hardware Serial ports)
The first attempt worked properly, I send a .JSON string trough the USB, and using ArduinoJSON library I am able to receive and to parse it properly. My problem comes when this .JSON string gets longer than 150bytes, in such case, the .JSON input its truncated, then deserializeJson function fails, returning the IncompleteInput method. ArduinoJSON support webpage recommended to increase the timeout or increase the buffer size. (Increasing timeouts have not worked)
I have found that there are some methods in Teensy 4 to add buffer memory, but those apply only for the hardware serial ports, not the port I need (USB Serial).
I have also found another web where they modify the Arduino core to increase the buffer size:
https://www.hobbytronics.co.uk/arduino-serial-buffer-size
Could you please suggest a solution, so I can increase the buffer size in the USB Serial port of the Teensy 4.0?
Do you know any alternative lighter to send multiple variables through the USB without usage of JSON format?
Thanks in advance for your collaboration.