<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Blinking an LED with the PiFace</title><link>https://community.element14.com/products/raspberry-pi/w/documents/11080/blinking-an-led-with-the-piface</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Blinking an LED with the PiFace</title><link>https://community.element14.com/products/raspberry-pi/w/documents/11080/blinking-an-led-with-the-piface</link><pubDate>Fri, 08 Oct 2021 05:29:42 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a936adaa-2bc2-4cde-980f-5a1155aba55e</guid><dc:creator>PEarle</dc:creator><comments>https://community.element14.com/products/raspberry-pi/w/documents/11080/blinking-an-led-with-the-piface#comments</comments><description>Current Revision posted to Documents by PEarle on 10/8/2021 5:29:42 AM&lt;br /&gt;
&lt;p style="margin:0;"&gt;Having bought my Pi, added a PiFace, and got the emulator running, (there&amp;#39;s a lot of useful information at &lt;a class="jive-link-external-small" href="http://www.piface.org.uk/guides/" rel="nofollow ugc noopener" target="_blank" title="http://www.piface.org.uk/guides/"&gt;PiFace – Guides&lt;/a&gt;) I now want to &amp;#39;do something - i.e physically hook something up to see something happen! being a bit of a beginner at electronics I thought I would start with something simple - turning an LED on or off.&lt;/p&gt;&lt;p style="margin:0;"&gt;The first step is to assemble the components, and then make the LED turn and off using the PiFace emulator. Component wise I needed an LED, a resistor, some jumper cables and a breadboard. &lt;em&gt;(A breadboard is a matrix which allows you to assemble components without soldering, for prototyping/designing)&lt;/em&gt; It was quite hard to get my head round what I needed to do - this is all completely new to me - but I realised that I needed to supply power to the LED and then turn it on and off by completing/breaking the circuit.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;I found a really good guide &lt;a class="jive-link-external-small" href="https://projects.drogon.net/raspberry-pi/gpio-examples/tux-crossing/gpio-examples-1-a-single-led/#comment-2413" rel="nofollow ugc noopener" target="_blank"&gt;here&lt;/a&gt; as a starting point which showed me how to hook up an LED to a Pi (without the PiFace connected) and to get an LED to turn on.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;The circuit is quite simple - 3.3v supply from the Pi, a resistor in line between the supply and the LED, and then a return to the IO port which will control switching the LED on and off. The photo below shows it hooked up on my desk.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/620x464/__key/communityserver-wikis-components-files/00-00-00-01-69/contentimage_5F00_47671.jpg"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/69/contentimage_47671.jpg-620x464.jpg?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=ZhEzJdZ6ptLPa%2F%2B%2FLFBZ4zTGX3bpmY7xkX1q%2BG32Ylc%3D&amp;amp;se=2026-05-07T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=3deLDCKq9E98FVviYeoqWQ==" style="max-height: 464px;max-width: 620px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Here&amp;#39;s a close up of the bread board wiring&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/620x465/__key/communityserver-wikis-components-files/00-00-00-01-69/contentimage_5F00_47672.jpg"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/69/contentimage_47672.jpg-620x465.jpg?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=B5Km2YXDx%2FdTwqbkVEtRS%2BE%2Bdtqnf9nPeBdbLFtNaEE%3D&amp;amp;se=2026-05-07T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=bJqZvbDQFU4hYmEWGdH6Zg==" style="max-height: 465px;max-width: 620px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;And that&amp;#39;s it - you can use the emulator to try turning it on or off, or write a program to do it. I&amp;#39;ve written a java program using the Pi4j extension - and you can see the video of it running &lt;a class="jive-link-external-small" href="http://www.element14.com/community/videos/8428/l/flashing-leds-on-my-pi" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: led, piface&lt;/div&gt;
</description></item></channel></rss>