Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COthanks for all the answers everyone. i guess i'll test the performance of the read/write pyserial functions before i consider moving onto something else. but could you explain the blocked serial calls and why they perhaps require decoupling the rest of the program (you're right, the reading/writing is only a small part of the required functionality).
      singulars
    2. COPyserial will by default block on read calls (you can configure it so it doesn't do this). What this means is that when you call `read`, the whole program sits and waits for something to be written, then reads it, then your program can continue. There are a couple of ways around this, by either using non-blocking calls (`read` returns immediately, but maybe with nothing), event driven frameworks like twisted (twisted knows you're waiting and does other things in the meantime), or by using processes/threading (though you have the same problem listening for incoming messages from the process).
      singulars
    3. COyeah, i've set the timeout=0 and then end up getting one char at a time. that is, i perform serial.read(1) within a while loop and check for '\r' which indicates the end of the return command and when that condition is met i then issue a new get position request. from some brief experimentation, it doesn't seem like i've missed any frames in the camera system, which is great, although i'd like to somehow ensure that this is always the case. like if i open a browser while the program is executing, is there a way to force the script to have highest priority?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload