UART buffer flush
-
Hello,
l am using below code to wait for the UART data and take action accordingly. It works for the first time but once I receive some data uart.any() is always true after that. The uart buffer doesn't get clear it seems. Please check.
while(1):
if uart.any():
data = uart.readall()
print("data received over UART:"+str(data))
s.setblocking(True)
print(s.send(data))
time.sleep(0.5)
del dataObjective is to send data only when there is a new data available over uart.
Regards,
Sameer
-
This post is deleted!
-
Hi,
Yes, it seems to be the same issue. When can I expect a fix for this?
Any work around? any other api to check new data arrival at UART?
Regards
Sameer
-
@sameerchouksey It could be related to this issue:
https://forum.pycom.io/topic/2595/uart-rx-buffer-issue-after-buffer-overflow
That is about to be fixed soon.