serial terminal

General discussion about topics related to OpenMV.
pcls1026
Posts: 62
Joined: Tue Aug 22, 2017 1:33 am

serial terminal

Postby pcls1026 » Sat Feb 24, 2018 3:52 pm

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
User avatar
kwagyeman
Posts: 2111
Joined: Sun May 24, 2015 2:10 pm

Re: serial terminal

Postby kwagyeman » Sat Feb 24, 2018 4:33 pm

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?
Nyamekye,
pcls1026
Posts: 62
Joined: Tue Aug 22, 2017 1:33 am

Re: serial terminal

Postby pcls1026 » Sat Feb 24, 2018 5:44 pm

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
Attachments
blksearch.py
(1.94 KiB) Downloaded 28 times
User avatar
kwagyeman
Posts: 2111
Joined: Sun May 24, 2015 2:10 pm

Re: serial terminal

Postby kwagyeman » Sat Feb 24, 2018 6:35 pm

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.
Nyamekye,
pcls1026
Posts: 62
Joined: Tue Aug 22, 2017 1:33 am

Re: serial terminal

Postby pcls1026 » Tue Feb 27, 2018 3:34 pm

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.
Attachments
copygrayvgatofile.py
(1.23 KiB) Downloaded 23 times
pcls1026
Posts: 62
Joined: Tue Aug 22, 2017 1:33 am

Re: serial terminal

Postby pcls1026 » Tue Feb 27, 2018 3:39 pm

HI,
I attached the wrong code in the previous reply.
Here is the correct code.
Attachments
copygrayvgatofile.py
(1.23 KiB) Downloaded 28 times
User avatar
kwagyeman
Posts: 2111
Joined: Sun May 24, 2015 2:10 pm

Re: serial terminal

Postby kwagyeman » Tue Feb 27, 2018 4:11 pm

You have to import the pyb module.
Nyamekye,
pcls1026
Posts: 62
Joined: Tue Aug 22, 2017 1:33 am

Re: serial terminal

Postby pcls1026 » Tue Feb 27, 2018 6:08 pm

It works. Sorry for all the trouble.
Jim Sullivan

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 4 guests