sending data over wifi/adc sample rate

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
Posts: 8
Joined: Sun Aug 26, 2018 6:04 pm

sending data over wifi/adc sample rate

Post by Batman » Mon Jun 29, 2020 6:49 pm

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?

User avatar
Posts: 4268
Joined: Fri Jul 18, 2014 8:01 am
Location: UK

Re: sending data over wifi/adc sample rate

Post by pythoncoder » Tue Jun 30, 2020 4:09 am

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.
Peter Hinch

Post Reply