<?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[How to import my own module into a project?]]></title><description><![CDATA[<p dir="auto">Hello. I'm new to m5stack. I have a possibly simple question. how to import my own modules in a project? in block or python modes?</p>
]]></description><link>https://community.m5stack.com/topic/3338/how-to-import-my-own-module-into-a-project</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 10:23:53 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3338.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 May 2021 16:52:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to import my own module into a project? on Tue, 03 Jan 2023 21:31:00 GMT]]></title><description><![CDATA[<p dir="auto">Ok it's an old one but as I've found a solution...</p>
<p dir="auto">1- Write your function code in test_code1.py for example, with a function dazi() inside.<br />
2- Write your program code and on the top :<br />
from apps import test_code1<br />
3- when you want to use your dazi function, write then test_code1.dazi('.........../......')</p>
<p dir="auto">It's working for me.</p>
]]></description><link>https://community.m5stack.com/post/19697</link><guid isPermaLink="true">https://community.m5stack.com/post/19697</guid><dc:creator><![CDATA[democrazia]]></dc:creator><pubDate>Tue, 03 Jan 2023 21:31:00 GMT</pubDate></item><item><title><![CDATA[Reply to How to import my own module into a project? on Tue, 08 Jun 2021 18:16:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gaviota" aria-label="Profile: gaviota">@<bdi>gaviota</bdi></a> Well thank you.<br />
I'm  tired of my own inability to solve this problem. So far, I just threw all the functions into the project.<br />
Later I will do so, as you advise.</p>
]]></description><link>https://community.m5stack.com/post/14043</link><guid isPermaLink="true">https://community.m5stack.com/post/14043</guid><dc:creator><![CDATA[Alexander]]></dc:creator><pubDate>Tue, 08 Jun 2021 18:16:05 GMT</pubDate></item><item><title><![CDATA[Reply to How to import my own module into a project? on Tue, 08 Jun 2021 17:51:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alexander" aria-label="Profile: alexander">@<bdi>alexander</bdi></a> try visual studio code (vscode) to import your module in the directory where you can find also the file <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>. Tutorials for using m5stack with vscode are located on the m5stack-youtoube-channel <a href="https://www.youtube.com/channel/UCozgFVglWYQXbvTmGyS739w" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/channel/UCozgFVglWYQXbvTmGyS739w</a> e.g. this video: <a href="https://www.youtube.com/watch?v=Y9pOWgsNgKk" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/watch?v=Y9pOWgsNgKk</a><br />
<img src="/assets/uploads/files/1623174429022-vscode_m5stack-resized.jpg" alt="0_1623174429537_vscode_m5stack.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/14042</link><guid isPermaLink="true">https://community.m5stack.com/post/14042</guid><dc:creator><![CDATA[Gaviota]]></dc:creator><pubDate>Tue, 08 Jun 2021 17:51:38 GMT</pubDate></item><item><title><![CDATA[Reply to How to import my own module into a project? on Tue, 08 Jun 2021 16:57:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gaviota" aria-label="Profile: gaviota">@<bdi>gaviota</bdi></a> I'm trying to. But M5stack:"ERROR no module named"<br />
Until I understand what is wrong.</p>
]]></description><link>https://community.m5stack.com/post/14041</link><guid isPermaLink="true">https://community.m5stack.com/post/14041</guid><dc:creator><![CDATA[Alexander]]></dc:creator><pubDate>Tue, 08 Jun 2021 16:57:35 GMT</pubDate></item><item><title><![CDATA[Reply to How to import my own module into a project? on Tue, 08 Jun 2021 16:11:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alexander" aria-label="Profile: alexander">@<bdi>alexander</bdi></a> you have to store it on the M5stack in the directory where the <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a> file is located and use it with python code in execute blocks.</p>
]]></description><link>https://community.m5stack.com/post/14040</link><guid isPermaLink="true">https://community.m5stack.com/post/14040</guid><dc:creator><![CDATA[Gaviota]]></dc:creator><pubDate>Tue, 08 Jun 2021 16:11:14 GMT</pubDate></item><item><title><![CDATA[Reply to How to import my own module into a project? on Tue, 08 Jun 2021 15:37:20 GMT]]></title><description><![CDATA[<p dir="auto">I have a <a href="http://file.py" target="_blank" rel="noopener noreferrer nofollow ugc">file.py</a>. There are 20 custom functions in the file. This is a lot of code. Many of the functions call each other in calculations.<br />
In any new M5flow project, I just want to write "import file" first. And that's all.<br />
I don't want to rewrite all the functions separately for the M5flow. Or insert all this code into each new project manually. Or create blocks for each function.<br />
I saved the file to the device manager file. But still importing the file doesn't work.<br />
It seemed to me that there should be a simple and obvious solution. This is all very strange.<br />
maybe I just need to save the file in the appropriate format in the appropriate directory Uim5flow installed on the pc?</p>
]]></description><link>https://community.m5stack.com/post/14039</link><guid isPermaLink="true">https://community.m5stack.com/post/14039</guid><dc:creator><![CDATA[Alexander]]></dc:creator><pubDate>Tue, 08 Jun 2021 15:37:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to import my own module into a project? on Tue, 08 Jun 2021 15:05:38 GMT]]></title><description><![CDATA[<p dir="auto">Thank you.</p>
]]></description><link>https://community.m5stack.com/post/14038</link><guid isPermaLink="true">https://community.m5stack.com/post/14038</guid><dc:creator><![CDATA[Alexander]]></dc:creator><pubDate>Tue, 08 Jun 2021 15:05:38 GMT</pubDate></item><item><title><![CDATA[Reply to How to import my own module into a project? on Tue, 01 Jun 2021 01:19:01 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/alexander" aria-label="Profile: Alexander">@<bdi>Alexander</bdi></a> ,<br />
First you may need create your module file(like <a href="http://myModules.py" target="_blank" rel="noopener noreferrer nofollow ugc">myModules.py</a>) on UIFlow,and create some block for your modules.<br />
<img src="/assets/uploads/files/1622509887804-2021-06-01_09-09-resized.png" alt="0_1622509885440_2021-06-01_09-09.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Then make some block for your modules.<br />
<img src="/assets/uploads/files/1622509957963-2021-06-01_09-12-resized.png" alt="0_1622509955738_2021-06-01_09-12.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Make some blocks on this workspace.<br />
<img src="/assets/uploads/files/1622510087264-2021-06-01_09-14-resized.png" alt="0_1622510085086_2021-06-01_09-14.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">When you are finished, you can click the download button in the lower right corner, and then open the downloaded m5b file in UIFlow.<br />
<img src="/assets/uploads/files/1622510334129-2021-06-01_09-18-resized.png" alt="0_1622510331971_2021-06-01_09-18.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/13964</link><guid isPermaLink="true">https://community.m5stack.com/post/13964</guid><dc:creator><![CDATA[IAMLIUBO]]></dc:creator><pubDate>Tue, 01 Jun 2021 01:19:01 GMT</pubDate></item></channel></rss>