<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[UDP data transmission]]></title><description><![CDATA[<p dir="auto">Happy new year to everyone!<br />
I am working with UIFlow (and uPython) to allow an UDP communication with a software on my PC.<br />
I need to send a certain string over my network and this is the code that I wrote:</p>
<p dir="auto">from m5stack import<br />
from m5stack_ui import<br />
from uiflow import<br />
import wifiCfg<br />
import socket<br />
from easyIO import<br />
screen = M5Screen()<br />
screen.clean_screen()<br />
screen.set_screen_bg_color(0xFFFFFF)<br />
wifiCfg.doConnect('NET', 'PSW')<br />
udpsocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)<br />
udpsocket.connect(('', 52790))<br />
while True:<br />
udpsocket.sendto(str((analogRead(36))), ('255.255.255.255', 52791))<br />
wait_ms(1)</p>
<p dir="auto">Everything works, but the communication is really slow, less than 50 messages per second.<br />
When I use Arduino IDE, I can do the same at a sample rate of 500 messages per second.<br />
Is this a limitation of uPython or do I commit an error?</p>
<p dir="auto">Thank you very much and best regards</p>
]]></description><link>https://community.m5stack.com/topic/3876/udp-data-transmission</link><generator>RSS for Node</generator><lastBuildDate>Tue, 05 May 2026 11:16:51 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3876.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Jan 2022 14:11:14 GMT</pubDate><ttl>60</ttl></channel></rss>