<?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[File &quot;base&#x2F;stepmotor.py&quot;, line 1, in __init__ ValueError: invalid pin]]></title><description><![CDATA[<p dir="auto">Hi everyone</p>
<p dir="auto">I am trying to use an Atomic stepmotor base (SKU:A132) with an Atom lite (SKU:C008) Uiflow2.0 (v2.2.8) but it does not work.<br />
I get this error message :<br />
File "base/stepmotor.py", line 1, in <strong>init</strong> ValueError: invalid pin<br />
I think pins are sets correctly :</p>
<p dir="auto"><img src="/assets/uploads/files/1748709818619-38d1dcce-b905-4aae-a05e-d21985540e9c-image.png" alt="38d1dcce-b905-4aae-a05e-d21985540e9c-image.png" class=" img-fluid img-markdown" /></p>
<pre><code>base_stepmotor = AtomicStepmotorBase(22, 23, 19, 25, 21)
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1748709905880-15997103-342b-4b44-b740-150df10abb9a-image.png" alt="15997103-342b-4b44-b740-150df10abb9a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I do not understand why it's throwing error and what i am doing wrong ?</p>
]]></description><link>https://community.m5stack.com/topic/7589/file-base-stepmotor-py-line-1-in-__init__-valueerror-invalid-pin</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 05:52:19 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7589.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 31 May 2025 16:47:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to File &quot;base&#x2F;stepmotor.py&quot;, line 1, in __init__ ValueError: invalid pin on Sun, 01 Jun 2025 08:45:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/107451">@Schnoble</a></p>
<p dir="auto">clever! Maybe you could put your modified version into an <code>Execute mpy code (eg. import)</code>? This block can be found under <code>System</code>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/29147</link><guid isPermaLink="true">https://community.m5stack.com/post/29147</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 01 Jun 2025 08:45:49 GMT</pubDate></item><item><title><![CDATA[Reply to File &quot;base&#x2F;stepmotor.py&quot;, line 1, in __init__ ValueError: invalid pin on Sun, 01 Jun 2025 08:23:55 GMT]]></title><description><![CDATA[<p dir="auto">For what it worth, I make it work by switching to micropython and replacing</p>
<pre><code>from base import AtomicStepmotorBase
</code></pre>
<p dir="auto">by a modified version of <a href="http://stepmotor.py" target="_blank" rel="noopener noreferrer nofollow ugc">stepmotor.py</a> before downloading the code</p>
<p dir="auto">If you like using blockly, you need to paste modification each time though...</p>
]]></description><link>https://community.m5stack.com/post/29146</link><guid isPermaLink="true">https://community.m5stack.com/post/29146</guid><dc:creator><![CDATA[Schnoble]]></dc:creator><pubDate>Sun, 01 Jun 2025 08:23:55 GMT</pubDate></item><item><title><![CDATA[Reply to File &quot;base&#x2F;stepmotor.py&quot;, line 1, in __init__ ValueError: invalid pin on Sat, 31 May 2025 18:53:38 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a><br />
Let's hope</p>
]]></description><link>https://community.m5stack.com/post/29142</link><guid isPermaLink="true">https://community.m5stack.com/post/29142</guid><dc:creator><![CDATA[Schnoble]]></dc:creator><pubDate>Sat, 31 May 2025 18:53:38 GMT</pubDate></item><item><title><![CDATA[Reply to File &quot;base&#x2F;stepmotor.py&quot;, line 1, in __init__ ValueError: invalid pin on Sat, 31 May 2025 18:04:53 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/107451">@Schnoble</a></p>
<p dir="auto">you are not doing anything wrong I think. The issue is with UIFlow2 firmware for M5AtomLite. As far as I can tell the default pins are for M5Atom<strong>S3</strong> (Lite) and there is one additional pin, which cannot be set from the init block and it is set to a GPIO (8) only available in S3. See <a href="https://github.com/m5stack/uiflow-micropython/blob/master/m5stack/libs/base/stepmotor.py#L37" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">BTW: I've created a <a href="https://github.com/m5stack/uiflow-micropython/issues/54" target="_blank" rel="noopener noreferrer nofollow ugc">PR</a> for the issue. So hopefully it will be fixed in a future firmware version.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/29141</link><guid isPermaLink="true">https://community.m5stack.com/post/29141</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 31 May 2025 18:04:53 GMT</pubDate></item></channel></rss>