new serial service

I have determined that my scooter routine is hanging up on trying to clean out the serial buffer that used to work with MRL .99. 

Where can I find out what the new serial routine can accept and pass back and forth, command line options.

like how many characters in buffer, empty buffer, stop serial?



GroG's picture

The new serial (1.0.118) can

The new serial (1.0.118) can do synchronous & asynchronous reads, it can also clear and filter, it can even be enabled with timeouts on synchronous reads. The data being displayed to the view is helpful too -

Do you have the script which your currently using in you script library ?
If not can you post it and I'll help getting what you need out of the new service.

harland's picture

my scooter script is posted

my scooter script is posted under harland 

when I sent the "no worky" last week I posted it.

def clearbuffer():
  crap = 0
  crap = serial.available()
  print("cbuf " + str(crap))
#would like to clean out serial buffer
  for i in range(1,crap):
    junk =
#    print("junk=" + str(junk))

It looks like serial.available is always showing 0 bytes with new code.


GroG's picture

Short Answer .. don't read ..

Short Answer .. don't read .. use the .clear method !


read will block unless you set it up to timeout - clear() does not block

Some other things I noticed:

Ran your script with 2 virtual ports

I can see the Eddie board recieves this initially

I noticed in you no worky - you have a " Unknown Application - for COM3"

Zombie problem perhaps ?