<?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>Documents</title><link>https://community.element14.com/technologies/code_exchange/w/documents</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Arduino: ePaper Name Badge_</title><link>https://community.element14.com/technologies/code_exchange/w/documents/16546/arduino-epaper-name-badge_5f00_</link><pubDate>Fri, 08 Oct 2021 07:39:39 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:26460dfa-3fac-4cd0-867a-29ba284c1256</guid><dc:creator>fustiniadmin</dc:creator><description>Current Revision posted to Documents by fustiniadmin on 10/8/2021 7:39:39 AM&lt;br /&gt;
&lt;span&gt;Migration in progress&lt;/span&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: code_exchange, arduino&lt;/div&gt;
</description></item><item><title>CodeWarrior version Renewal...take a look!~</title><link>https://community.element14.com/technologies/code_exchange/w/documents/16289/codewarrior-version-renewal-take-a-look</link><pubDate>Fri, 08 Oct 2021 07:32:53 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:bf34e644-6e04-4872-a86c-8bffc3a20fad</guid><dc:creator>DebuggerGuys</dc:creator><description>Current Revision posted to Documents by DebuggerGuys on 10/8/2021 7:32:53 AM&lt;br /&gt;
&lt;p style="margin:0;"&gt;Hello all debuggers!&lt;/p&gt;&lt;p style="margin:0;"&gt;How would a renewal for the v10.5 of CodeWarrior would sound?&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:10pt;line-height:1.5em;"&gt;If you want to get it, wait no more and pay close attention to this post, because you&amp;#39;ll be learning how to do so in just a matter of few simple steps. &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;The following example will attempt to teach you (successfully, I&amp;#39;m sure of that &lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/16x16/__key/communityserver-wikis-components-files/00-00-00-01-51/contentimage_5F00_1.png"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/contentimage_1.png-16x16.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=NQQyQrXfXn8f5oe44e5MUQRIUcL4kWuw2ggaicBm%2B48%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=zGEM7pHL10Vt71gae75OdA==" style="max-height: 16px;max-width: 16px;" /&gt;&lt;/a&gt;&lt;/span&gt; ), how to get the current version 10.5 of CodeWarrior for Microcontrollers. (Eclipse based).&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Are you ready Freddy? Here are the steps:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Log in to My Freescale using your registered member ID(email address) and password.&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a class="jive-link-external-small" href="https://www.freescale.com/security/public/login.LoginActionController.sp" rel="nofollow ugc noopener" target="_blank"&gt;https://www.freescale.com/security/public/login.LoginActionController.sp&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;Click on Software Licensing under My Secure applications menu. — &amp;quot;My Software Licensing Home&amp;quot; page will appear showing your currently licensed products.&lt;/p&gt;&lt;p style="margin:0;"&gt;Look for the entitlement ID for the license you wish to use, and click on License Options.&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/977x191/__key/communityserver-wikis-components-files/00-00-00-01-51/contentimage_5F00_28537.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/contentimage_28537.png-977x191.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=rOtZSbUPmn2eNyGfT9E3kTy1WKoL5wYOJmu%2BBweGh%2Bg%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=UfZwOmsJVc9zS1rEWjViPA==" style="max-height: 191px;max-width: 977px;" /&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;Look for the version you want to renew version for, and locate Version Renewal button. This option will be enabled only for those versions which have a new released version. Additionally, in order to have access, your yearly Technical Support/licensing&amp;nbsp; must be active. You can review your expiration date under Support Expires Colum on your Software Licensing Home page.&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/977x407/__key/communityserver-wikis-components-files/00-00-00-01-51/contentimage_5F00_28538.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/contentimage_28538.png-977x407.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=vonTFgtLVFQx9vxiq7xLsEX00%2FDBLxJc3W8gmtu%2Fms4%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=QyZWT2FeJv2GpNge2fGTsg==" style="max-height: 407px;max-width: 977px;" /&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;After clicking on Version Renewal, the Display License page will appear showing you the latest license file for the new version, in this case license version for 10.5 Eclipse Based SW CodeWarrior.&amp;nbsp; It will also provide you with a “click here” link to download the current v10.5 release if you have not already installed it.&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/977x397/__key/communityserver-wikis-components-files/00-00-00-01-51/contentimage_5F00_28539.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/contentimage_28539.png-977x397.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=rx16NbCtHRaKx15gDVLkngoRg%2BHKUYodqM9fztcvJPA%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=4HXC6T//Tc0HVmCeKafyjg==" style="max-height: 397px;max-width: 977px;" /&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;Click on Download License link and save the new license file to the MCU folder of your CW for MCU v10.5 installation.&amp;nbsp; After re-launching CodeWarrior, the new license.dat file should function as expected.&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;IF you have any problems please don&amp;#39;t hesitate and contact us, emailing &lt;a class="jive-link-email-small" href="mailto:support@freescale.com"&gt;support@freescale.com&lt;/a&gt; or reaching our &lt;a class="jive-link-external-small" href="http://www.freescale.com/webapp/sps/site/homepage.jsp?code=SUPPORTHOME" rel="nofollow ugc noopener" target="_blank"&gt;support site&lt;/a&gt;.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Best of lucks!!! &lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/16x16/__key/communityserver-wikis-components-files/00-00-00-01-51/contentimage_5F00_2516.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/contentimage_2516.png-16x16.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=tdPU3l2PA%2F79I5q8sbGsmrPWgHAsCPpneLjga53GQzw%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=heES4XYcBt0dSn/cCMo/FA==" style="max-height: 16px;max-width: 16px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: freescale, cw, codewarrior, codewarrior_v10.5&lt;/div&gt;
</description></item><item><title>It's working! chipKIT Max32 with added IO Sheild</title><link>https://community.element14.com/technologies/code_exchange/w/documents/10720/it-s-working-chipkit-max32-with-added-io-sheild</link><pubDate>Fri, 08 Oct 2021 05:18:55 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:0e23ffc2-d6f1-4fbf-a69a-d0306581cec2</guid><dc:creator>patkelly</dc:creator><description>Current Revision posted to Documents by patkelly on 10/8/2021 5:18:55 AM&lt;br /&gt;
&lt;p style="margin:0;"&gt;After much head scratching and lot of google&amp;#39;ing I finally got the OLED screen on the chipKIT IO Shield to turn on. Here&amp;#39;s the proof:&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-51/contentimage_5F00_20723.jpg"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/contentimage_20723.jpg-620x465.jpg?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=%2F7aQAoLIIh3h9xPoaspTx2b9ZdUsxLDhdWVKNqqLW%2B0%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=aSQ5xOVlUzL4kXFlETUwpg==" 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;Please join me in the most triumphant achievement. I think I deserve a cuppa and a biscuit(if I can find some).&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Here is the code that I used to get the OI shield to display, it&amp;#39;s a mashup of the demo script and the usual Arduino button script. So if you switch the sliding switch at pin 2 on, the OLED screen turns on, switch it again it goes off. &lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;A few prerequisites, when you download the OLED demo from the Max32 website the example code is in a different folder to the files required so make sure you copy all these over to the same directory (it&amp;#39;s one those silly little things that gets you scratching your head, for ages going &amp;quot;but it&amp;#39;s right, just work&amp;quot;):&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;ChrFont0.c&lt;/li&gt;&lt;li&gt;delay.c&lt;/li&gt;&lt;li&gt;delay.h&lt;/li&gt;&lt;li&gt;FillPat.c&lt;/li&gt;&lt;li&gt;IOSheildOled.cpp&lt;/li&gt;&lt;li&gt;IOShieldOled.h&lt;/li&gt;&lt;li&gt;OledChar.c&lt;/li&gt;&lt;li&gt;OledChar.h&lt;/li&gt;&lt;li&gt;OLedDriver.c&lt;/li&gt;&lt;li&gt;OledDriver.h&lt;/li&gt;&lt;li&gt;OledGrph.c&lt;/li&gt;&lt;li&gt;OledGrph.h&lt;/li&gt;&lt;/ul&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;&amp;lt;-------Code Start---------&amp;gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;#include &amp;lt;IOShieldOled.h&amp;gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;const int buttonPin = 2;&lt;/p&gt;&lt;p style="margin:0;"&gt;int buttonState = 0;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;void setup()&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; IOShieldOled.begin();&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; pinMode(buttonPin, INPUT);&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;void loop()&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; int irow;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; int ib;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; //Clear the virtual buffer&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; IOShieldOled.clearBuffer();&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; //Chosing Fill pattern 0&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; IOShieldOled.setFillPattern(IOShieldOled.getStdPattern(0));&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; //Turn automatic updating off&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; IOShieldOled.setCharUpdate(0);&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; buttonState = digitalRead(buttonPin);&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; // check if the pushbutton is pressed.&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; // if it is, the buttonState is HIGH:&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; if (buttonState == HIGH) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // turn LED on:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.displayOn();&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; } &lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; else {&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // turn LED off:&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.displayOff();&lt;/p&gt;&lt;p style="margin:0;"&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;&amp;nbsp; for (irow = 0; irow &amp;lt; IOShieldOled.rowMax; irow++)&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; {&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.clearBuffer();&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.setCursor(0, 0);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.putString(&amp;quot;element14.com&amp;quot;);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.setCursor(0, 1);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.putString(&amp;quot;Community&amp;quot;);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.setCursor(0, 2);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.putString(&amp;quot;by PK&amp;quot;);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.setCursor(0, 3);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.putString(&amp;quot;Not bad eh!&amp;quot;);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOShieldOled.updateDisplay();&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; }&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp; delay(100);&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;lt;------------Code End---------------&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p style="margin:0;"&gt;Hopefully, I&amp;#39;ll post a more in depth review on this great piece of kit in the next few &amp;#39;bits&amp;#39; of time.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;All the best &lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Pat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: code_exchange, Code Exchange, codeexchange&lt;/div&gt;
</description></item><item><title>pfproj-1153</title><link>https://community.element14.com/technologies/code_exchange/w/documents/10690/pfproj-1153</link><pubDate>Fri, 08 Oct 2021 05:18:18 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b7772151-2689-49ce-81c4-7fe3c74b7e6e</guid><dc:creator>natari</dc:creator><description>Current Revision posted to Documents by natari on 10/8/2021 5:18:18 AM&lt;br /&gt;
&lt;p style="margin:0;"&gt;github &lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: source_code, code_exchange, Code Exchange&lt;/div&gt;
</description></item><item><title>Arduino: ePaper Name Badge</title><link>https://community.element14.com/technologies/code_exchange/w/documents/10272/arduino-epaper-name-badge</link><pubDate>Fri, 08 Oct 2021 05:08:05 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b3f1c627-ec59-487f-86ef-9ef5f49218ce</guid><dc:creator>fustini</dc:creator><description>Current Revision posted to Documents by fustini on 10/8/2021 5:08:05 AM&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;strong&gt;Source code:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a class="jive-link-external-small" href="https://github.com/pdp7/ePaperBadge" rel="nofollow ugc noopener" target="_blank"&gt;Repository&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="jive-link-external-small" href="https://github.com/pdp7/ePaperBadge/zipball/master" rel="nofollow ugc noopener" target="_blank"&gt;ZIP download&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;I built a &lt;a class="jive-link-blog-small" href="/members-area/personalblogs/b/blog/posts/hello-my-name-is-pdp7"&gt;7-segment name badge&lt;/a&gt; to show off my Twitter username, &lt;a class="jive-link-external-small" href="https://twitter.com/pdp7" rel="nofollow ugc noopener" target="_blank"&gt;pdp7&lt;/a&gt;, at events.&amp;nbsp; It looked great indoors but the LEDs couldn&amp;#39;t compete with the sun outdoors.&amp;nbsp; I can across SparkFun&amp;#39;s &lt;a class="jive-link-external-small" href="http://www.sparkfun.com/products/10150" rel="nofollow ugc noopener" target="_blank"&gt;ePaper display&lt;/a&gt; which is daylight readable like a Kindle e-reader and decided to build another name badge.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Since I can display two lines of 10 characters, I am to display both my full name and my Twitter username.&amp;nbsp; The ePaper display is driven by a SparkFun breakout board which is controlled by an Arduino Pro Mini.&amp;nbsp; The Arduino sketch for my name badge resides in the repository linked above.&amp;nbsp; The ZIP link provides a direct download of the latest version.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Photo:&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/600x800/__key/communityserver-wikis-components-files/00-00-00-01-51/contentimage_5F00_19741.jpg"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/contentimage_19741.jpg-600x800.jpg?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=LWex%2FCzhAP9lZUYRafG04N6DauFIELA1w7Y5gL6t%2BbQ%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=pCDQQ8m9Xv+phStpAjIxAQ==" style="max-height: 800px;max-width: 600px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;Video:&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;span&gt;&lt;a href="https://www.youtube.com/watch?v=S20h6XJPpw0"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;p style="margin:0;"&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: code_exchange, Code Exchange, arduino&lt;/div&gt;
</description></item><item><title>i have made this code for receive string and store it into an array then comparing it to perform task but its not working.help me to get eny sollution</title><link>https://community.element14.com/technologies/code_exchange/w/documents/4893/i-have-made-this-code-for-receive-string-and-store-it-into-an-array-then-comparing-it-to-perform-task-but-its-not-working-help-me-to-get-eny-sollution</link><pubDate>Wed, 06 Oct 2021 22:22:18 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:1d780079-4e4e-44e5-90ae-7f63538a8a59</guid><dc:creator>gk.rajatc</dc:creator><description>Current Revision posted to Documents by gk.rajatc on 10/6/2021 10:22:18 PM&lt;br /&gt;
&lt;p style="margin:0;"&gt;#ifndef F_CPU&lt;/p&gt;&lt;p style="margin:0;"&gt;#define F_CPU 8000000UL // 16Mhz clock speed&lt;/p&gt;&lt;p style="margin:0;"&gt;#endif&lt;/p&gt;&lt;p style="margin:0;"&gt;#include &amp;lt;avr/io.h&amp;gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;#include &amp;lt;util/delay.h&amp;gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;#include &amp;lt;string.h&amp;gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;//#define USART_BAUDRATE 9600&lt;/p&gt;&lt;p style="margin:0;"&gt;#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) -1)&lt;/p&gt;&lt;p style="margin:0;"&gt;#define LED_ON&amp;nbsp; PORTD |= (1&amp;lt;&amp;lt;PIND6);&lt;/p&gt;&lt;p style="margin:0;"&gt;#define LED_OFF6&amp;nbsp; PORTD &amp;amp;= ~(1&amp;lt;&amp;lt;PIND6);&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;volatile unsigned char string[15],x,i =0;&lt;/p&gt;&lt;p style="margin:0;"&gt;volatile char Reply_CallReady[15]=&amp;quot;apple&amp;quot;;&lt;/p&gt;&lt;p style="margin:0;"&gt;volatile char C;&lt;/p&gt;&lt;p style="margin:0;"&gt;volatile char data[10];&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;void UART_init(long USART_BAUDRATE)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;UCSRB |=(1&amp;lt;&amp;lt;RXEN)|(1&amp;lt;&amp;lt;TXEN)|(1&amp;lt;&amp;lt;RXCIE);//TURN ON TRANSMISSION AND RECEPTION.&lt;/p&gt;&lt;p style="margin:0;"&gt;UCSRC |=(1&amp;lt;&amp;lt;URSEL)|(1&amp;lt;&amp;lt;UCSZ0)|(1&amp;lt;&amp;lt;UCSZ1);//USE 8 BIT CHARACTER.&lt;/p&gt;&lt;p style="margin:0;"&gt;UBRRL |=(BAUD_PRESCALE);//LOAD LOWER 8 BITS OF THE BAUD RATE VALUE.&lt;/p&gt;&lt;p style="margin:0;"&gt;UBRRH |=(BAUD_PRESCALE&amp;gt;&amp;gt;8);//LOAD UPPER 8 BIT.&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;unsigned char UART_Rxchar()&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;while((UCSRA &amp;amp; (1&amp;lt;&amp;lt;RXC))==0);//wait till data is received.&lt;/p&gt;&lt;p style="margin:0;"&gt;return(UDR);//RETURN THE BYTE.&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;void UART_Txchar(char ch)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;while (!(UCSRA &amp;amp; (1&amp;lt;&amp;lt;UDRE)));//wait for empty transmit buffer.&lt;/p&gt;&lt;p style="margin:0;"&gt;UDR=ch;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;void UART_sendstring(char *str)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;unsigned char j=0;&lt;/p&gt;&lt;p style="margin:0;"&gt;while(str[j]!=0)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // send string till null.&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;UART_Txchar(str[j]);&lt;/p&gt;&lt;p style="margin:0;"&gt;j++;&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;void lcd_cmd(char cm)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;char a=cm;&lt;/p&gt;&lt;p style="margin:0;"&gt;PORTA=a;&lt;/p&gt;&lt;p style="margin:0;"&gt;PORTB=(0&amp;lt;&amp;lt;PD0)|(0&amp;lt;&amp;lt;PD1)|(1&amp;lt;&amp;lt;PD2);&lt;/p&gt;&lt;p style="margin:0;"&gt;_delay_ms(50);&lt;/p&gt;&lt;p style="margin:0;"&gt;PORTB=(0&amp;lt;&amp;lt;PD0)|(0&amp;lt;&amp;lt;PD1)|(0&amp;lt;&amp;lt;PD2);&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;void lcd_data(char dat)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;char b=dat;&lt;/p&gt;&lt;p style="margin:0;"&gt;PORTA=b;&lt;/p&gt;&lt;p style="margin:0;"&gt;PORTB=(1&amp;lt;&amp;lt;PD0)|(0&amp;lt;&amp;lt;PD1)|(1&amp;lt;&amp;lt;PD2);&lt;/p&gt;&lt;p style="margin:0;"&gt;_delay_ms(50);&lt;/p&gt;&lt;p style="margin:0;"&gt;PORTB=(1&amp;lt;&amp;lt;PD0)|(0&amp;lt;&amp;lt;PD1)|(0&amp;lt;&amp;lt;PD2);&lt;/p&gt;&lt;p style="margin:0;"&gt;_delay_ms(50);&lt;/p&gt;&lt;p style="margin:0;"&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;unsigned char *UART_RX_STR(x)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;while (x != &amp;#39;\0&amp;#39;)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;string[i++] = x;&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;return string;&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;}&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;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;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;ISR(USART_RXC_vect)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;C=UDR;&lt;/p&gt;&lt;p style="margin:0;"&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;int main()&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;DDRB=0xFF;&lt;/p&gt;&lt;p style="margin:0;"&gt;DDRA=0xFF;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;UART_init(9600);&lt;/p&gt;&lt;p style="margin:0;"&gt;while(1)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;C=UART_Rxchar();&lt;/p&gt;&lt;p style="margin:0;"&gt;x=C;&lt;/p&gt;&lt;p style="margin:0;"&gt;if (strcmp(string,Reply_CallReady) ==0)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;LED_ON;&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;}&lt;/p&gt;&lt;p style="margin:0;"&gt;else&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;LED_OFF6;&lt;/p&gt;&lt;p style="margin:0;"&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;}&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Code Exchange&lt;/div&gt;
</description></item><item><title>Rescaling positive value</title><link>https://community.element14.com/technologies/code_exchange/w/documents/3840/rescaling-positive-value</link><pubDate>Wed, 06 Oct 2021 21:42:06 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:ba492e24-1c2e-4c41-b73b-60ce970b098e</guid><dc:creator>jpnbino</dc:creator><description>Current Revision posted to Documents by jpnbino on 10/6/2021 9:42:06 PM&lt;br /&gt;
&lt;p style="margin:0;"&gt;Edit: I know its boring to take someone else&amp;#39;s code and set up an environment. For that, I&amp;#39;ve made the code available and ready to run in &lt;a class="jive-link-external-small" href="https://www.jdoodle.com/embed/v0/FeZ" rel="nofollow ugc noopener" target="_blank" title="https://www.jdoodle.com/embed/v0/FeZ"&gt;https://www.jdoodle.com/embed/v0/FeZ&lt;/a&gt; &lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Hey Folks, many times we need to translate values to different ranges so I wrote this piece of code. I hope you enjoy and give feedback and ideas to improve:&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&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
  @Description
    This function performs a conversion from one scale X to scale Y. The relation between those scales is considered linear. Then, based on the parameters a known value x in scale X is converted to a value y in scale Y.
  @Preconditions
    None
  @Param
    x  - is the value to be converted to scale y
     xa - is the minimum scale X value.
     xb - is the maximum scale X value.
     ya - is the minimum scale Y value.
     yb - is the maximum scale Y value.
  @Returns
    The value converted from scale X to scale Y.
  @Comment
    This function uses the round half up method as an integer rounding method
  @Example
    &amp;lt;code&amp;gt;
     #define MIN_X 20
     #define MAX_X 50

     #define MIN_Y 1000
     #define MAX_Y 2000

     uint16_t y;
     uint16_t x = 30;

     y = Rescale_Value( x, MIN_X, MAX_X, MIN_Y, MAX_Y );

    &amp;lt;/code&amp;gt;
*/

uint16_t Rescale_Value (uint16_t x , uint16_t xa, uint16_t xb, uint16_t ya, uint16_t yb )
{
/**
Algorithm:
1 - Find a linear equation;
2 - Calculate the equation considering rounding;

Explanation:
- A equation of the line correlates two different range of values. The equation
is given by the following formula,

y = ((yb - ya)*(x - xa))/(xb - xa)) + ya;

where,
(xa,ya) and (xb,yb) -&amp;gt; are known points in the line.

OBS: to complete understand solution search equation of the line theory.
Considerations:
y will be written as a/b + ya
where,
a = (yb - ya)*(x - xa)
b = (xb - xa)
*/
//test input condition
    if(x &amp;lt; xa)
    {
        x = xa;
    }
    else if ( x &amp;gt; xb)
    {
        x = xb;
    }
  
uint16_t y;

//multiplication of two 16bits gives a 32bits integer
uint32_t a;
uint16_t b;


a = (yb - ya)*(x - xa);
b = (xb - xa);

/**
In the matter of integers, calculation rounding must be considered.
Then, y is calculated using the round half up method
So, a/b is aproximated as (a/b + 1/2), but as calculation is performed by integers
1/2 = 0 (zero), then (a/b + 1/2) is rewritten as((a + b/2)/b).
*/
y = ((a + b/2)/b) + ya;

    return y ; 
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Donovan Wescoat intends to Hack like Heck</title><link>https://community.element14.com/technologies/code_exchange/w/documents/3419/donovan-wescoat-intends-to-hack-like-heck</link><pubDate>Wed, 06 Oct 2021 21:30:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4207e716-6289-4309-90ef-4927396e7798</guid><dc:creator>ironfoxgaming</dc:creator><description>Current Revision posted to Documents by ironfoxgaming on 10/6/2021 9:30:00 PM&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight:inherit;font-style:inherit;font-family:inherit;color:#303030;"&gt;I intend to make a video that shows me creating a working project. I&amp;#39;m planning on recreating the fake leak of the 1DS.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight:inherit;font-style:inherit;font-family:inherit;color:#303030;"&gt;I will post the video on the element14 Community by the submission deadline. It probably won&amp;#39;t take that long, right?&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight:inherit;font-style:inherit;font-family:inherit;color:#303030;"&gt;If my video is one of the top 10 finalists I will receive $500 for my video. Woot!&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-weight:inherit;font-style:inherit;font-family:inherit;color:#303030;"&gt;I&amp;#39;ve always had a fascination with fake and concept game consoles like the PS5, the Nintendo Revolution, and the 1DS. I think it&amp;#39;d be awesome to recreate a few of these.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-weight:inherit;font-style:inherit;font-family:inherit;color:#303030;"&gt;The 1DS will be my project for this contest: an emulation system with a feel similar to the 2DS.&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;&lt;span style="font-weight:inherit;font-style:inherit;font-family:inherit;color:#303030;"&gt;&lt;a href="https://i.ytimg.com/vi/Iw-4XHkJCcY/maxresdefault.jpg"&gt;&lt;img alt="image"  class="image-1 jive-image" height="106" src="https://i.ytimg.com/vi/Iw-4XHkJCcY/maxresdefault.jpg" style="width:189px;height:106.389px;" width="189" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: hlhdoc, hlh_intent&lt;/div&gt;
</description></item><item><title>need help with pull up on input</title><link>https://community.element14.com/technologies/code_exchange/w/documents/1945/need-help-with-pull-up-on-input</link><pubDate>Wed, 06 Oct 2021 21:02:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:e3035cf5-1c9d-4cb3-8480-10dbe3721f8f</guid><dc:creator>joetrotter</dc:creator><description>Current Revision posted to Documents by joetrotter on 10/6/2021 9:02:14 PM&lt;br /&gt;
&lt;p style="margin:0;"&gt;I am using the gertboard and wiringPi ,and trying to figure out the buttons. The program reads the low when the pull is pushed, but when not pushed, the input is acting as if it is floating and reading random HIGH and LOW. Im a teacher, new to RaspberryPi, beginner&amp;nbsp; programmer, and am trying to further my knowledge of C. Any help is appreciated. My code is:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;#include &amp;lt;wiringPi.h&amp;gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;#include &amp;lt;math.h&amp;gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;#include &amp;lt;time.h&amp;gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;int main(void)&lt;/p&gt;&lt;p style="margin:0;"&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;wiringPiSetupGpio();&lt;/p&gt;&lt;p style="margin:0;"&gt;pinMode(25,INPUT);&lt;/p&gt;&lt;p style="margin:0;"&gt;pullUpDnControl(25,PUD_UP); &lt;/p&gt;&lt;p style="margin:0;"&gt;pinMode(17,OUTPUT);&lt;/p&gt;&lt;p style="margin:0;"&gt;pinMode(24,OUTPUT);&amp;nbsp; //if these unused i/o left not set up. they follow GPIO 17 for some reason&lt;/p&gt;&lt;p style="margin:0;"&gt;digitalWrite(24,LOW);&lt;/p&gt;&lt;p style="margin:0;"&gt;pinMode(23,OUTPUT);&lt;/p&gt;&lt;p style="margin:0;"&gt;digitalWrite(23,LOW);&lt;/p&gt;&lt;p style="margin:0;"&gt;pinMode(22,OUTPUT);&lt;/p&gt;&lt;p style="margin:0;"&gt;digitalWrite(22,LOW);&lt;/p&gt;&lt;p style="margin:0;"&gt;pinMode(21,OUTPUT);&lt;/p&gt;&lt;p style="margin:0;"&gt;digitalWrite(21,LOW);&lt;/p&gt;&lt;p style="margin:0;"&gt;pinMode(18,OUTPUT);&lt;/p&gt;&lt;p style="margin:0;"&gt;digitalWrite(18,LOW);&lt;/p&gt;&lt;p style="margin:0;"&gt;pinMode(15,OUTPUT);&lt;/p&gt;&lt;p style="margin:0;"&gt;digitalWrite(15,LOW);&lt;/p&gt;&lt;p style="margin:0;"&gt;int x=0;&lt;/p&gt;&lt;p style="margin:0;"&gt;while(x&amp;lt;20)&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;if (digitalRead(25)==LOW)&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;printf(&amp;quot;pushed LED ON, %i\n&amp;quot;,x);&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;digitalWrite(17,HIGH);&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;while (digitalRead(25)==LOW)&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;{;}&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;if (digitalRead(25)==HIGH)&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;{&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;printf(&amp;quot;not pushed LED OFF , %i\n&amp;quot;,x);&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;digitalWrite(17,LOW);&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;while (digitalRead(25)==HIGH)&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;{;}&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;x++;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&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;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;}&lt;/p&gt;&lt;p style="margin:0;"&gt;return 0;&lt;/p&gt;&lt;p style="margin:0;"&gt;}&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt; &lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Loading non-repo jars with Maven</title><link>https://community.element14.com/technologies/code_exchange/w/documents/1615/loading-non-repo-jars-with-maven</link><pubDate>Wed, 06 Oct 2021 20:51:49 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:10eaa62a-441c-47c1-9574-d773c85ab998</guid><dc:creator>PEarle</dc:creator><description>Current Revision posted to Documents by PEarle on 10/6/2021 8:51:49 PM&lt;br /&gt;
&lt;p style="margin:0;"&gt;A circumstance may arise whereby a jar file is required for a project which is not in maven. This has happened recently in a project I worked on which requires a Websphere MQ jar, which is not available via maven.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;The jar can be included into the project as follows - the main steps are&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Deploy the jar to a file location within the project&lt;/li&gt;&lt;li&gt;Use the maven-install-plugin to load the jar from the file system rather than from the maven repo&lt;/li&gt;&lt;li&gt;Dependencies are defined in pom.xml as normal (see version number below)&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:14pt;"&gt;&lt;strong&gt;Deploy jar file to project location&lt;/strong&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;The jar file needs to be deployed to a repo location - maven has a command to do this as follows ;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;mvn install:install-file -Dfile=&amp;lt;jar_file_to_deploy&amp;gt; -DgroupId=&amp;lt;groupid&amp;gt; -DartifactId=&amp;lt;?artifactid?&amp;gt; -Dversion=&amp;lt;version&amp;gt; -Dpackaging=jar -DlocalRepositoryPath=&amp;lt;deployment_location&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;E.g. for the &lt;strong&gt;mq.jar&lt;/strong&gt;, which is group id &lt;strong&gt;com.ibm&lt;/strong&gt;, artifact id &lt;strong&gt;mq&lt;/strong&gt; use the following command&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mvn install:install-file -Dfile=C:\peter\mqjms-9.0.jar -DgroupId=com.ibm -DartifactId=mq -Dversion=9.0 -Dpackaging=jar -DlocalRepositoryPath=E:\Repos\Git\mqbridge\repo&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Note the version - this is set artificially high to ensure hat it doesn not conflict with any pre-existing maven version&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-size:14pt;"&gt;&lt;strong&gt;maven-install-plugin&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;The &lt;strong&gt;pom.xml&lt;/strong&gt; file needs to know that it should load the jar file from the file store, rather than from the maven repository. This can be achieved as shown below.&lt;/p&gt;&lt;p style="margin:0;"&gt;Note that multiple executions are used for multiple files. It should be noted that the files are loaded during the install-file phase of the build - to ensure that this goal is implemented, the project should be built with the &amp;#39;clean&amp;#39; parameter (e.g. &lt;em&gt;mvn clean install&lt;/em&gt;)&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-install-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;executions&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;install-mq&amp;lt;/id&amp;gt;
            &amp;lt;phase&amp;gt;process-resources&amp;lt;/phase&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;install-file&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
            &amp;lt;configuration&amp;gt;
                &amp;lt;groupId&amp;gt;com.ibm&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;mq&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;9.0&amp;lt;/version&amp;gt;
                &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;
                &amp;lt;file&amp;gt;${project.basedir}/repo/com/ibm/mq/9.0/mq-9.0.jar&amp;lt;/file&amp;gt;
            &amp;lt;/configuration&amp;gt;
        &amp;lt;/execution&amp;gt;
        &amp;lt;execution&amp;gt;
            &amp;lt;id&amp;gt;install-mqjms&amp;lt;/id&amp;gt;
            &amp;lt;phase&amp;gt;process-resources&amp;lt;/phase&amp;gt;
            &amp;lt;goals&amp;gt;
                &amp;lt;goal&amp;gt;install-file&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
            &amp;lt;configuration&amp;gt;
                &amp;lt;groupId&amp;gt;com.ibm&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;mqjms&amp;lt;/artifactId&amp;gt;
                &amp;lt;version&amp;gt;9.0&amp;lt;/version&amp;gt;
                &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;
                &amp;lt;file&amp;gt;${project.basedir}/repo/com/ibm/mqjms/9.0/mqjms-9.0.jar&amp;lt;/file&amp;gt;
            &amp;lt;/configuration&amp;gt;
        &amp;lt;/execution&amp;gt;
    &amp;lt;/executions&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&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;&lt;span style="font-size:14pt;"&gt;&lt;strong&gt;Define dependencies&lt;/strong&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;Dependencies are defined as normal - the version number should match the version used when the jar file was deployed to the file system (see above).&lt;/p&gt;&lt;p style="margin:0;"&gt;E.g.&lt;/p&gt;&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;com.ibm&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;mq&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;9.0&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;com.ibm&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;mqjms&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;9.0&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Code Exchange</title><link>https://community.element14.com/technologies/code_exchange/w/documents/737/code-exchange</link><pubDate>Tue, 05 Oct 2021 14:04:34 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9bc05f32-781c-4937-b762-c26181778315</guid><dc:creator>migration.user</dc:creator><description>Current Revision posted to Documents by migration.user on 10/5/2021 2:04:34 PM&lt;br /&gt;
&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Documents</title><link>https://community.element14.com/technologies/code_exchange/w/documents</link><pubDate>Fri, 01 Oct 2021 18:00:22 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:e32e8e1f-4972-4117-8605-e25ce908857f</guid><dc:creator>migration.user</dc:creator><description>Current Revision posted to Documents by migration.user on 10/1/2021 6:00:22 PM&lt;br /&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Scratch project for PiFace demo</title><link>https://community.element14.com/technologies/code_exchange/w/documents/11165/scratch-project-for-piface-demo</link><pubDate>Mon, 24 Jun 2013 16:59:21 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9a7c4405-4b62-499e-a8bf-6ea44e660d46</guid><dc:creator>fustini</dc:creator><description>Current Revision posted to Documents by fustini on 6/24/2013 4:59:21 PM&lt;br /&gt;
&lt;p style="margin:0;"&gt;Scratch project file created based on the Scratch demo shown in the PiFace documentation:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;strong&gt;&amp;quot;Controlling Pi Face with Scratch&amp;quot;&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a class="jive-link-external-small active_link" href="https://docs.google.com/folder/d/0B-UAZ9CyJCLGQjJ3RDlqa2pqaDg/edit?docId=1M0jz7-vaR8mwM4Gc4dBJyh4EheXHd0BCkpBWOEqMOUY" rel="nofollow" style="color:#355491;" target="_blank"&gt;https://docs.google.com/folder/d/0B-UAZ9CyJCLGQjJ3RDlqa2pqaDg/edit?docId=1M0jz7-vaR8mwM4Gc4dBJyh4EheXHd0BCkpBWOEqMOUY&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;See below under &lt;strong&gt;Attachments&lt;/strong&gt; the file &lt;a href="#https://www.element14.com/community/servlet/JiveServlet/download/53805-3-110687/piface1.sb.zip" class="migration-embeded-object"&gt;piface1.sb.zip&lt;/a&gt; .&amp;nbsp; Download the file and unzip it.&amp;nbsp; Scratch should be able to open piface1.sb.&amp;nbsp; Note: you will first need to follow the instructions in the &lt;strong&gt;&amp;quot;Controlling Pi Face with Scratch&amp;quot;&lt;/strong&gt; link above to get Scratch setup correctly.&amp;nbsp; &lt;em&gt;(This involves starting a Mesh session and then running the PiFace handler script to connect to the Mesh session.&amp;nbsp; This allows Scratch to interact with the PiFace.)&lt;/em&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;&lt;/p&gt;&lt;span&gt;&lt;a href="https://www.youtube.com/watch?v=9XDImK_z3H0"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;p style="margin:0;"&gt;&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-51/1731.contentimage_5F00_24828.jpg"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/1731.contentimage_24828.jpg-620x465.jpg?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=pLzOuKbIifa98TvYFvBdlkD4ex%2Bcx%2FV%2Fu73gssZhm3U%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=H6lTJ1qdLYHLD/1vqVqLTw==" style="max-height: 465px;max-width: 620px;" /&gt;&lt;/a&gt;&lt;/span&gt;&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-51/3858.contentimage_5F00_24829.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/51/3858.contentimage_24829.jpg-620x465.jpg?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=n36aiMvdi0pX5vwI9EgylUmNaH%2BVypJQU3qqQJ8i%2BxM%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=Sx56ywX9dnHyCBQclvNe4g==" style="max-height: 465px;max-width: 620px;" /&gt;&lt;/a&gt;&lt;/span&gt;&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-51/1715.contentimage_5F00_24830.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/51/1715.contentimage_24830.jpg-620x465.jpg?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=s47aRbLkXFCek3jcbqbi0zXt9xlFWdEYLMTvqLqkLko%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=tMbFheS3WhwYAQhm6eygqQ==" 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;&lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/198x119/__key/communityserver-wikis-components-files/00-00-00-01-51/8662.contentimage_5F00_24831.png"&gt;&lt;img loading="lazy" alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/wikis/components/files/00/00/00/01/51/8662.contentimage_24831.png-198x119.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=z8VjIM7w4VuC1QIbt9jzlzFPcfNUP9neLB3Vd8RTKOE%3D&amp;amp;se=2026-04-10T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=M680jr6CZqUXZhkhzMEAJg==" style="max-height: 119px;max-width: 198px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:#333333;"&gt;For Amazing BrainTeaser contest entries - please post the answer here to enter giveaway: &lt;a class="jive-link-wiki-small" href="/members-area/hall-of-fame/w/documents/11226/amazing-brainteaser-contest-entry-for-clue-8-across-this-contest-has-ended"&gt;http://www.element14.com/community/docs/DOC-54752&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="migration-injected-attachments"&gt;&lt;div style="font-weight:bold;margin:15px 0 5px 0;"&gt;Attachments:&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;table style="border:0;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;span class="_se_attachment" id="attid_https://www.element14.com/community/api/core/v3/attachments/110687"&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-01-51/piface1.sb.zip"&gt;community.element14.com/.../piface1.sb.zip&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: scratch, code_exchange, piface_digital, education, pi, Code Exchange, raspberry_pi, rpi, codeexchange, piface&lt;/div&gt;
</description></item></channel></rss>