Hello,
Excuse my ignorance but what is the difference between using uart.any() and the Select Class: http://docs.micropython.org/en/latest/l ... ule-select? To me it seems like a long winded way to achieve the same results?
Please correct me if I am wrong.
Thanks, Cooper
Select Class
Re: Select Class
The uart.any() method tells you if there are characters waiting in the buffer for a specific serial port; the 'uart' object could be any one of 6 hardware serial ports on the pyboard or the USB_VCP virtual comm port.
As I understand it, the Select class allows you to register a set of these 6 available UART ports along with the USB_VCP port for polling through a single object - a single point to listen to a set of data streams, rather than polling each initialized UART separately.
(Disclaimer - I haven't tried to use Select in my code yet, but that is how I understand it.)
-Bryan
As I understand it, the Select class allows you to register a set of these 6 available UART ports along with the USB_VCP port for polling through a single object - a single point to listen to a set of data streams, rather than polling each initialized UART separately.
(Disclaimer - I haven't tried to use Select in my code yet, but that is how I understand it.)
-Bryan