<?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[Can I use Pins to connect external buttons and LED&#x27;s?]]></title><description><![CDATA[<p dir="auto">Would it be possible to connect an external button as well as an external LED light to the expansion board? I'm hoping to connect a LoPy4 as well as a few buttons to the expansion board but I'm unsure if this is supported. Are there open pins I can use for general purposes like this?</p>
<p dir="auto">Are there any tutorials on working with the pins? It doesn't look like the LoPy documentation has much there unless I'm missing something.</p>
]]></description><link>https://forum.pycom.io/topic/3418/can-i-use-pins-to-connect-external-buttons-and-led-s</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 11:58:35 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/3418.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Jun 2018 21:02:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can I use Pins to connect external buttons and LED&#x27;s? on Thu, 28 Jun 2018 21:02:15 GMT]]></title><description><![CDATA[<p dir="auto">Would it be possible to connect an external button as well as an external LED light to the expansion board? I'm hoping to connect a LoPy4 as well as a few buttons to the expansion board but I'm unsure if this is supported. Are there open pins I can use for general purposes like this?</p>
<p dir="auto">Are there any tutorials on working with the pins? It doesn't look like the LoPy documentation has much there unless I'm missing something.</p>
]]></description><link>https://forum.pycom.io/post/20521</link><guid isPermaLink="true">https://forum.pycom.io/post/20521</guid><dc:creator><![CDATA[cooper]]></dc:creator><pubDate>Thu, 28 Jun 2018 21:02:15 GMT</pubDate></item><item><title><![CDATA[Reply to Can I use Pins to connect external buttons and LED&#x27;s? on Thu, 28 Jun 2018 22:16:33 GMT]]></title><description><![CDATA[<p dir="auto">Hey Cooper, the part in the documentation you need is <a href="https://docs.pycom.io/chapter/firmwareapi/pycom/machine/Pin.html" target="_blank" rel="noopener noreferrer nofollow">6.2.1.4 Pin</a>. This gives you the basics of running an LED from a pin or using a button as an input.</p>
<p dir="auto">If you connect a button between a pin and ground (0V) then you need to configure the pin with a pull-up resistor. Vice-versa works too: a button between the pin and 3.3V with a PULL_DOWN on the pin.</p>
<pre><code>p_in = Pin('P10', mode=Pin.IN, pull=Pin.PULL_UP)
</code></pre>
<p dir="auto">When you connect an LED to a pin you need a resistor in series with the LED. 220ohms should work.</p>
<p dir="auto">When you look at the <a href="https://docs.pycom.io/chapter/datasheets/downloads/lopy-pinout.pdf" target="_blank" rel="noopener noreferrer nofollow">LoPy Pinout Diagram</a> all those pins marked as GPIO<em>xx</em> can be a button input or LED output. So you can use lots!</p>
<ul>
<li>Chris.</li>
</ul>
]]></description><link>https://forum.pycom.io/post/20525</link><guid isPermaLink="true">https://forum.pycom.io/post/20525</guid><dc:creator><![CDATA[Prawnhead]]></dc:creator><pubDate>Thu, 28 Jun 2018 22:16:33 GMT</pubDate></item><item><title><![CDATA[Reply to Can I use Pins to connect external buttons and LED&#x27;s? on Fri, 29 Jun 2018 01:36:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/2415">@prawnhead</a> thank you! That's exactly what I needed to know :)</p>
]]></description><link>https://forum.pycom.io/post/20533</link><guid isPermaLink="true">https://forum.pycom.io/post/20533</guid><dc:creator><![CDATA[cooper]]></dc:creator><pubDate>Fri, 29 Jun 2018 01:36:04 GMT</pubDate></item></channel></rss>