<?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[microPython on esp32 C3 mate error InvalidPin when use GP19 for relay.]]></title><description><![CDATA[<p dir="auto">User<br />
Hi,<br />
With microPython on esp32 C3 mate, I would like to use a 3A Relay unit, for that I use GP19 which are also dedicate for USA D+,  with the following code:<br />
'''python3<br />
import machine<br />
...<br />
relay = machine.Pin("GP19", machine.Pin.OUT)<br />
...<br />
if temp &gt; 42:<br />
...<br />
relay.value(1)<br />
elif temp &lt; 40:<br />
...<br />
relay.value(0)<br />
else:<br />
pass<br />
...<br />
'''</p>
<p dir="auto">But I have this error:<br />
Traceback (most recent call last):<br />
File "<a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>", line 7, in &lt;module&gt;<br />
ValueError: invalid pin</p>
<p dir="auto">Do you know why?<br />
Is it possible to use GP19 for a relay even if this Pin is dedicate to USA D+?</p>
<p dir="auto">Thanks you,<br />
Sebastien</p>
]]></description><link>https://community.m5stack.com/topic/5779/micropython-on-esp32-c3-mate-error-invalidpin-when-use-gp19-for-relay</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 23:05:11 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5779.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Nov 2023 18:25:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to microPython on esp32 C3 mate error InvalidPin when use GP19 for relay. on Thu, 09 Nov 2023 05:48:05 GMT]]></title><description><![CDATA[<p dir="auto">the GP is not required, only numbers are required.</p>
]]></description><link>https://community.m5stack.com/post/22686</link><guid isPermaLink="true">https://community.m5stack.com/post/22686</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Thu, 09 Nov 2023 05:48:05 GMT</pubDate></item><item><title><![CDATA[Reply to microPython on esp32 C3 mate error InvalidPin when use GP19 for relay. on Wed, 08 Nov 2023 05:12:04 GMT]]></title><description><![CDATA[<p dir="auto">Why don't you use the 1st argument (pin number) in integer format ?</p>
]]></description><link>https://community.m5stack.com/post/22677</link><guid isPermaLink="true">https://community.m5stack.com/post/22677</guid><dc:creator><![CDATA[stjofr]]></dc:creator><pubDate>Wed, 08 Nov 2023 05:12:04 GMT</pubDate></item></channel></rss>