Page 1 of 1

sending data over wifi/adc sample rate

Posted: Mon Jun 29, 2020 6:49 pm
by Batman
These might be naive questions. However, I would like to be sure before buying one of the pyboard-Ds.

Can I use the wifi connection to send data (collected using the ADC pins) to another computer? Or stated differently, can I read data from the pyboard from a computer, using the wifi?

I have searched for example scripts but I was unable to find any. If someone has a pointer to an example script, that would be highly appreciated.

Are the ADC and DAC sample rates on the pyboard-D as fast as on the pyboard 1.1? Can the pyboard collect and produce samples at (at least) the same rate as the pyboard 1.1?

Re: sending data over wifi/adc sample rate

Posted: Tue Jun 30, 2020 4:09 am
by pythoncoder
Q1: Yes, there are a number of protocols for doing this: HTTP, MQTT or direct communication using sockets. Be aware that WiFi is neither fast nor robust: it suffers from temporary outages and latency caused by competing use of the WiFi and of its RF spectrum. Some resilient protocols mitigate the effects of outages by avoiding data loss, but latency during outages is inevitable.

Q2: I haven't studied this in detail, but I've yet to find any case where the Pyboard D fails to match or exceed the performance of the Pyboard 1.x. It also has the best WiFi implementation of any hardware I've tried: this is because the WiFi is performed by a separate chip so doesn't impact the performance of the Python VM.