Open gebl opened 7 years ago
Uh. Interesting. :(
@ponty ? @Premik ? @SebastianZug ? Someone knows?
Hi, I can imagine you hit some simavr bug. Like this one: https://github.com/buserror/simavr/issues/144 It seems to me like once the xoff signal is generated the uart stops receiving bytes. As a dirty workaround you can try to:
while (Serial.available() > 0)
call. Instead always just Serial.read()
. The return value would be -1 when there are no data.avr.uart.send_string(line+"\n")
with:
for c in line+"\n":
avr.uart.send_string(c)
time.sleep(0.3)
pysimavr.uart.send_string
method. To not ingnore the return value (x
variable) from the backend. As it is used to indicate when the uart_buf device buffer is full.
def send_string(self, s):
for c in s:
x = write_fifo(self.backend.fifo_out, ord(c))
if x < 0: raise BufferError("Avr io buffer full") #PATCH
Hello,
I'm trying to work with getting python code to write strings over the Serial link over time.
I've set up a loop that looks like this:
This works for a short period of time, but, if i wait to type input or try again later, it is never delivered to the arduino.
the arduino code looks like:
Am i missing something? is there a better way to serial write to the arduino sim?
gabe