<?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[Control Lego Power Functions via IR remote and blockly]]></title><description><![CDATA[<p dir="auto">Hey!</p>
<p dir="auto">I wanted to let my son experiment a bit with M5Stack and Lego. I've seen that there is a module to control Lego motors, but this seems to be rather for mindstorms motors (EV3 or NXT seem to be the notations). However, many cheaper Lego models come with Lego 'Power Functions' motors, which won't work with this module for all I can tell.</p>
<p dir="auto">I was thinking through different options, and finally felt like the easiest way is to just emulate the IR remote with M5Stack, which in theory would be pretty straightfoward to do. There are even some libraries to do so, but none seems to be compatible to UIFLow blockly, which my son would use:</p>
<p dir="auto"><a href="https://www.elecfreaks.com/store/blog/lego-power-functions-ir-sender-for-microbit.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.elecfreaks.com/store/blog/lego-power-functions-ir-sender-for-microbit.html</a><br />
<a href="https://github.com/jurriaan/Arduino-PowerFunctions" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/jurriaan/Arduino-PowerFunctions</a></p>
<p dir="auto">Is there any good way to import these into UIFlow blockly to use for an 8 year old?<br />
Might it be an option to integrate this by default into UIFlow, as it is a cool option for many users.</p>
<p dir="auto">Regards,<br />
Freefaller</p>
]]></description><link>https://community.m5stack.com/topic/1751/control-lego-power-functions-via-ir-remote-and-blockly</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 11:05:40 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1751.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Mar 2020 11:01:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Control Lego Power Functions via IR remote and blockly on Wed, 11 Mar 2020 09:42:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/freefaller" aria-label="Profile: freefaller">@<bdi>freefaller</bdi></a> the front end of UIFlow may be java but the back end code that gets sent to the M5Stack is Micropython</p>
]]></description><link>https://community.m5stack.com/post/7716</link><guid isPermaLink="true">https://community.m5stack.com/post/7716</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 11 Mar 2020 09:42:27 GMT</pubDate></item><item><title><![CDATA[Reply to Control Lego Power Functions via IR remote and blockly on Wed, 11 Mar 2020 09:27:20 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Someone did control PF using the stick C's built in IRLED but can't remember how.</p>
</blockquote>
<p dir="auto">So there's <a href="https://www.elecfreaks.com/store/blog/lego-power-functions-ir-sender-for-microbit.html" target="_blank" rel="noopener noreferrer nofollow ugc">existing integration for that into MakeCode</a> (which is also blockly based I believe) and then also the <a href="https://github.com/jurriaan/Arduino-PowerFunctions" target="_blank" rel="noopener noreferrer nofollow ugc">regular Arduino lib</a>. Also the <a href="https://github.com/jurriaan/Arduino-PowerFunctions/blob/master/LEGO_Power_Functions_RC_v120.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">whole IR protocol is documented</a> officially by Lego. But the MakeCode integration seems JS based (not Python based), and I also don't see a good waqy to integrate the Arduino lib into the UiFlow custom component editor. So probably whoever did this before just wrote regular Arduino code for the M5Stick using the Arduino library.</p>
<p dir="auto">If I ever find a lot of time I might try to reverse engineer the existing code, and redo as a custom block in UIFlow, but not sure if this will ever happen ;-)</p>
<blockquote>
<p dir="auto">There are instructions on how to build NXT&gt;PF leads but I haven't had time to revisit.</p>
</blockquote>
<p dir="auto">I'm also gonna look into that :-)</p>
]]></description><link>https://community.m5stack.com/post/7714</link><guid isPermaLink="true">https://community.m5stack.com/post/7714</guid><dc:creator><![CDATA[Freefaller]]></dc:creator><pubDate>Wed, 11 Mar 2020 09:27:20 GMT</pubDate></item><item><title><![CDATA[Reply to Control Lego Power Functions via IR remote and blockly on Tue, 10 Mar 2020 20:59:45 GMT]]></title><description><![CDATA[<p dir="auto">Sorry been absent for a while.<br />
Someone did control PF using the stick C's built in IRLED but can't remember how.<br />
There are instructions on how to build NXT&gt;PF leads but I haven't had time to revisit.</p>
]]></description><link>https://community.m5stack.com/post/7711</link><guid isPermaLink="true">https://community.m5stack.com/post/7711</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 10 Mar 2020 20:59:45 GMT</pubDate></item><item><title><![CDATA[Reply to Control Lego Power Functions via IR remote and blockly on Tue, 10 Mar 2020 12:42:32 GMT]]></title><description><![CDATA[<p dir="auto">Oh wow, sorry for missing this existing thread. Not exactly what I was looking for (as I was hoping for the infrared connection) but still what I need to solve my problem. Will probably then get the base-x module and solder myself the cable connections (can't seem to be able to buy them anywhere anymore).<br />
Thanks!</p>
]]></description><link>https://community.m5stack.com/post/7710</link><guid isPermaLink="true">https://community.m5stack.com/post/7710</guid><dc:creator><![CDATA[Freefaller]]></dc:creator><pubDate>Tue, 10 Mar 2020 12:42:32 GMT</pubDate></item><item><title><![CDATA[Reply to Control Lego Power Functions via IR remote and blockly on Mon, 09 Mar 2020 23:37:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/freefaller" aria-label="Profile: Freefaller">@<bdi>Freefaller</bdi></a> you can take a look at this thread for info about using older lego motors <a href="http://forum.m5stack.com/topic/1570/is-there-an-easy-way-to-connect-m5stack-or-m5stick-c-to-old-lego-mindstorms-motors-and-sensors-robotic-invention/15" target="_blank" rel="noopener noreferrer nofollow ugc">http://forum.m5stack.com/topic/1570/is-there-an-easy-way-to-connect-m5stack-or-m5stick-c-to-old-lego-mindstorms-motors-and-sensors-robotic-invention/15</a> also <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> is quite knowledgeable on this subject and usually quite happy to respond to any questions</p>
]]></description><link>https://community.m5stack.com/post/7707</link><guid isPermaLink="true">https://community.m5stack.com/post/7707</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Mon, 09 Mar 2020 23:37:55 GMT</pubDate></item></channel></rss>