Page 1 of 1

serial terminal

Posted: Sat Feb 24, 2018 3:52 pm
by pcls1026
Hi,
When I PRINT too much data, the serial terminal does not accept all of it. Is there any cure ,other than writing a file to the SD card as I talked about on my previous post; "F.WRITE" .
Jim

Re: serial terminal

Posted: Sat Feb 24, 2018 4:33 pm
by kwagyeman
Hi, the serial terminal can only accept bytes at a fixed speed. After which our serial buffers fill up. Adding a wait on the printing of values will fix the issue. Um, what are you trying to do exactly?

Re: serial terminal

Posted: Sat Feb 24, 2018 5:44 pm
by pcls1026
kwagyeman,
What do you mean by adding a wait. Is this a Python command?

I created a 3x24 2d list that I want to look at.
I attached code.

Jim

Re: serial terminal

Posted: Sat Feb 24, 2018 6:35 pm
by kwagyeman
The OpenMV Cam has a 512 byte buffer for characters that is polled every 2 ms. If you write data faster than this to the IDE then it can be lost. E.g. add pyb.delay(1) after printing three values. Anyway, your code works if you use an SD card. Please create a bug for the flash FS case on the github bug page.

Re: serial terminal

Posted: Tue Feb 27, 2018 3:34 pm
by pcls1026
Hi,
I'm sorry for the endless questions.
When I use pyb.delay(1) I get the error "NameError: name 'pyb' is not defined".
Code is attached.

Re: serial terminal

Posted: Tue Feb 27, 2018 3:39 pm
by pcls1026
HI,
I attached the wrong code in the previous reply.
Here is the correct code.

Re: serial terminal

Posted: Tue Feb 27, 2018 4:11 pm
by kwagyeman
You have to import the pyb module.

Re: serial terminal

Posted: Tue Feb 27, 2018 6:08 pm
by pcls1026
It works. Sorry for all the trouble.
Jim Sullivan