docs-content icon indicating copy to clipboard operation
docs-content copied to clipboard

Add delay() in plotter examples

Open wh201906 opened this issue 2 years ago • 4 comments

What This PR Changes

This PR adds delay() in the examples of software/ide-v2/tutorials/ide-v2-serial-plotter The original examples doesn't have delay() in the loop(), which is fine for the boards with hardware serial ports. The baudrate (9600) limits the data speed. normal However, for boards with USB serial port, the baudrate doesn't take affect. The board will send data to the PC at the maximum speed. too_fast

Contribution Guidelines

wh201906 avatar May 14 '23 06:05 wh201906

@jhansson-ard Hi. Would this PR be accepted?

wh201906 avatar Jul 18 '23 13:07 wh201906

Hello @wh201906! I've added someone from my team to take a look at your suggestion.

Thank you so much for your contributions! ⭐

jhansson-ard avatar Jul 18 '23 14:07 jhansson-ard

@jhansson-ard @jacobhylen Hi. Would this PR get accepted?

wh201906 avatar Dec 02 '23 02:12 wh201906

I set the delay timeout as 20ms because the original example takes around 32ms to send a frame to the hardware serial. (9600baud,8N1->960Bytes/s, ~31bytes per frame, (31B)/(960B/s)≈32.292ms) With the delay(20), the plot speed of the hardware serial won't go too slow, but the speed of USB serial is throttled to the same order of magnitude as the hardware serial's.

wh201906 avatar Dec 02 '23 02:12 wh201906