<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Dijital Elektronik Arduino Devre Paylaşım Platformu</title><description></description><managingEditor>noreply@blogger.com (kulogluelektronik)</managingEditor><pubDate>Sun, 2 Feb 2025 16:18:32 -0800</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">195</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>https://kulogluelektronik.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:category text="Technology"><itunes:category text="Gadgets"/></itunes:category><itunes:author>KulogluElectronic</itunes:author><itunes:owner><itunes:email>kulogluelektronik@gmail.com</itunes:email><itunes:name>KulogluElectronic</itunes:name></itunes:owner><item><title>Yalan makinesi</title><link>https://kulogluelektronik.blogspot.com/2021/07/yalan-makinesi.html</link><category>Devre</category><category>Kendin Yap</category><pubDate>Wed, 14 Jul 2021 08:47:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-5973423285662264645</guid><description>&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtTg0HGF3E9tLsGkwKWEoSQDVEiLMXVowdWOUpo4jE8F4rV1FGPoaHqOyAHMpAHeBMNSAr5bT3_4Z3BXK5mXTP0uGIq5QUChsEwj-r_Ycz7qGXlfzLm3EITXIETtMKHlo-8pgKnKkREJc/s250/lie.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="230" data-original-width="250" height="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtTg0HGF3E9tLsGkwKWEoSQDVEiLMXVowdWOUpo4jE8F4rV1FGPoaHqOyAHMpAHeBMNSAr5bT3_4Z3BXK5mXTP0uGIq5QUChsEwj-r_Ycz7qGXlfzLm3EITXIETtMKHlo-8pgKnKkREJc/w400-h368/lie.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/span&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;/span&gt;&lt;i&gt;Yalan Dedektörünün&lt;/i&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;&amp;nbsp;devre şeması&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;aşağıda gösterilmiştir.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Üç transistör (TR1 - TR3), bir kapasitör (C1), iki ışık veya LED (L1 ve L2), beş direnç (R1 - R5) ve bir değişken dirençten (VR1) oluşur.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Kullanılacak uygun transistörler BC547, BC548 veya BC549 veya herhangi bir başka küçük NPN transistördür.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;Bu devre, bir kişinin terlediğinde cilt direncinin değişmesi gerçeğine dayanmaktadır (terleme çünkü yalan söylüyorlar).&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Kuru cildin direnci yaklaşık 1 milyon ohm iken, nemli cildin direnci on kat veya daha fazla azalır.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;Dirençler R1 ve R2 bir voltaj bölücü oluşturur.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;1 000 000 ohm (1 mega ohm) dirençleri vardır ve değerleri eşit olduğundan, üst prob kablosundaki voltaj, akü voltajının yarısıdır (yaklaşık 4,5 volt).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;Sonda tellerini tutan bir kişi, cilt direncine bağlı olarak üst sonda telindeki voltajı değiştirecektir.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Cilt direnci R2 ile paraleldir ve R2'ye benzer veya daha küçük olması muhtemel olduğundan, cilt direnci düştükçe prob telindeki voltaj düşecektir.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;span style="vertical-align: inherit;"&gt;Kondansatör C1, bir yumuşatma kondansatörü olarak işlev görür ve bir kişinin vücudunda bulunan 50Hz kaynaklı şebeke vızıltısını ortadan kaldırır.&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;TR1 ve R3 bir tampon devresi oluşturur (yayıcı-takipçi olarak adlandırılır).&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;TR1'in emitöründeki voltaj, prob kablosundaki voltajı takip eder ve artık TR2 transistörünü çalıştırabilir.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;TR1 ve TR2 transistörleri bir voltaj karşılaştırıcı görevi görür.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;TR2'nin tabanındaki voltaj TR3'ün tabanından daha yüksekse, yeşil LED (L1) yanacaktır.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Tersi doğruysa kırmızı LED (L2) yanacaktır.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;/span&gt;&lt;i&gt;Yalan Dedektörünü&lt;/i&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;&amp;nbsp;test etmek&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;için prob kablolarını tutun.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;VR1'i yeşil LED yanıncaya ve kırmızı LED sönene kadar ayarlayın.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Bu, TR2'nin tabanındaki voltajın, TR3'ün tabanından biraz daha büyük olduğu noktadır.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Şimdi probları tutmak için nemli parmakları kullanın.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Bu, cilt direncini düşürür ve TR2'nin tabanındaki voltajın düşmesine neden olur.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;TR3'ün tabanındaki voltaj şimdi daha yüksek ve kırmızı LED yanıyor.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2 style="text-align: center;"&gt;&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('indirme kod')"&gt;indirme kod&lt;/a&gt;&lt;br /&gt;
&lt;div class="commenthidden" id="indirme kod"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;KODU BURAYA YAZINIZ...
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;a href="https://lnkload.com/2vbb1" target="_blank"&gt;Library Dowload&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/h2&gt;

&lt;br /&gt;
&lt;br /&gt; 
&lt;div style="background: #f56ffaa; border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; text-align: left; width: auto;"&gt;
&lt;h1 style="line-height: 250%; margin: 0px; text-align: center;"&gt;&lt;a href="https://www.youtube.com/channel/UCkvsog5tDTpt5ITNFrISKEg"&gt;&lt;b&gt;KULOGLUELEKTRONİK&lt;/b&gt;&lt;/a&gt;&lt;/h1&gt; 
&lt;/div&gt;
&lt;h1 style="text-align: center;"&gt;&lt;br /&gt;&lt;/h1&gt; </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtTg0HGF3E9tLsGkwKWEoSQDVEiLMXVowdWOUpo4jE8F4rV1FGPoaHqOyAHMpAHeBMNSAr5bT3_4Z3BXK5mXTP0uGIq5QUChsEwj-r_Ycz7qGXlfzLm3EITXIETtMKHlo-8pgKnKkREJc/s72-w400-h368-c/lie.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Arduino Projeler (LCD 16X2, DH11) Dijital Termometre Nem Ölçer Yapımı 003</title><link>https://kulogluelektronik.blogspot.com/2021/01/arduino-projeler-lcd-16x2-dh11-dijital.html</link><category>Arduino</category><category>Thermometer</category><pubDate>Thu, 14 Jan 2021 06:16:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-5290539755113735595</guid><description>
&lt;div class="mkdf-post-heading" style="background: 0px 0px rgb(255, 255, 255); border: 0px; color: grey; font-family: Montserrat, sans-serif; font-size: 14px; margin: 0px 0px 24px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="mkdf-post-image" style="background: 0px 0px; border: 0px; display: inline-block; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; position: relative; vertical-align: middle;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="mkdf-post-text" style="background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; color: grey; display: inline-block; font-family: Montserrat, sans-serif; font-size: 14px; margin: 0px; outline: 0px; padding: 0px 0px 10px; position: relative; vertical-align: middle; width: 616.656px;"&gt;&lt;div class="mkdf-post-text-inner" style="background: 0px 0px; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="mkdf-post-info-top" style="background: 0px 0px; border: 0px; color: #b5b5b5; font-size: 12px; margin: 0px 0px 8px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="background-color: initial; color: #ff9900; font-size: 18pt;"&gt;Sıcaklık ve Nem Sensörü&lt;/span&gt;&lt;/div&gt;&lt;div class="mkdf-post-text-main" style="background: 0px 0px; border: 0px; color: #424242; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;DHT22 veya DHT11 sıcaklık ve nem sensörü serisinin iki versiyonu var. Biraz benziyorlar ve aynı pinouta sahipler ama farklı özelliklere sahipler.&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;DHT22, açıkça daha iyi özelliklere sahip olan daha pahalı versiyondur. Sıcaklık ölçüm aralığı -40 ° C ile + 125 ° C arasında + -0.5 derece hassasiyetle, DHT11 sıcaklık aralığı +2 derece hassasiyetle 0 ° C ile 50 ° C arasındadır. Ayrıca DHT22 sensörü daha iyi nem ölçüm aralığına sahiptir, % 0 – 100 arasında% 2-5 doğrulukla, DHT11 nem aralığı ise% 5 ile% 20 doğrulukla ölçüm yapmaktadır.&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tQs1Gcq92alJ1SChLpWbwJlydtJmu6Xq4xud41_Juxdd-cp6uBbQvWaO2piZpDCyzi7ftTmeDbw8aDBOzdV8psUl76D2e1vXsDkVqRaR_O7f5GAQ7k5VNlaFyHpyb928wkM3pcD2H0U/s2048/Untitled+Sketch+2_bb.jpg" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" data-original-height="1443" data-original-width="2048" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tQs1Gcq92alJ1SChLpWbwJlydtJmu6Xq4xud41_Juxdd-cp6uBbQvWaO2piZpDCyzi7ftTmeDbw8aDBOzdV8psUl76D2e1vXsDkVqRaR_O7f5GAQ7k5VNlaFyHpyb928wkM3pcD2H0U/w400-h281/Untitled+Sketch+2_bb.jpg" width="400" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;figure class="wp-caption aligncenter" style="clear: both; height: auto; margin: 10px auto; max-width: 100%; opacity: 1;"&gt;&lt;div class="wp-caption aligncenter" style="background: 0px 0px; border: 0px; clear: both; height: auto; margin: 10px auto; max-width: 100%; opacity: 1; outline: 0px; padding: 0px; vertical-align: baseline; width: 768px;"&gt;&lt;p class="wp-caption-text" style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-style: italic; margin: 0px; opacity: 1; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Arduino DHT22 ve 16×2 Karakterli LCD Bağlantısı&lt;/p&gt;&lt;/div&gt;&lt;figcaption class="wp-caption-text" style="font-style: italic; margin: 0px; opacity: 1;"&gt;&lt;/figcaption&gt;&lt;/figure&gt;&lt;p style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span class="notranslate" style="background: 0px 0px; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Aşağıdaki çizim, 16 × 2 karakter LCD’deki sıcaklık ve bağıl nem değerlerini yazdıracaktır.&lt;/span&gt;&amp;nbsp;&lt;span class="notranslate" style="background: 0px 0px; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Değerleri LCD’de görüntülememiz dışında aynı kodu kullanacağız&lt;/span&gt;&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhujn8qwUSBhXTGFyVtyIY9pAfkASzxmRNIBnm63SMyhDGZC2h9Pg-aIo72jDRAtWEJSoGPJvd75qIDqnwBN67MbMXrupfG17gQQS2Zt_JX3iLjbej2vxvoUDGDblMaOr1QzhH96YMBLkM/s192/aaaa+434.jpg" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" data-original-height="144" data-original-width="192" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhujn8qwUSBhXTGFyVtyIY9pAfkASzxmRNIBnm63SMyhDGZC2h9Pg-aIo72jDRAtWEJSoGPJvd75qIDqnwBN67MbMXrupfG17gQQS2Zt_JX3iLjbej2vxvoUDGDblMaOr1QzhH96YMBLkM/w400-h300/aaaa+434.jpg" width="400" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="highlighter-strip" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;h3 class="joli-heading" id="arduino-project-dht11-and-dht22-am2302-with-lcd" style="background: 0px 0px; border: 0px; color: #121212; font-size: 19px; line-height: 1.23em; margin: 20px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="background: 0px 0px; border: 0px; color: #ff9900; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span class="notranslate" style="background: 0px 0px; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span class="highlighter-strip-bold-text" style="background: 0px 0px; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Arduino&lt;/span&gt;&amp;nbsp;Projesi Olarak 16×2&lt;/span&gt;&amp;nbsp;LCD’li DHT11 ve DHT22&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;p style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span class="notranslate" style="background: 0px 0px; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Sıcaklık ve nem seviyelerini izlemek istediğiniz bir fikriniz m var? Tam olarak doğru projeyi okuyorsunuz.&lt;/span&gt;&amp;nbsp;B&lt;span class="notranslate" style="background: 0px 0px; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;u örnekte, LCD’yi DHT11, DHT22 sensörüyle birlikte Arduino’ya bağlayacağız.&lt;/span&gt;&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="background: 0px 0px; border: 0px; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; margin: 10px 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg67w-C_aYSaG1Tj3ZeGsx3OHV762u0lNhwrcfak4uPhsHwBydlZcq484iWcX5AP-UPD4lKZQuHcoBLgdLV6WWqAPKeIvy6F7ST6w20Zc8pLh-jjq8rio7aJAU9BR6X_sC_EBWNV7QSkw/s2048/IMG_20210103_145737_627.jpg" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" data-original-height="1402" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg67w-C_aYSaG1Tj3ZeGsx3OHV762u0lNhwrcfak4uPhsHwBydlZcq484iWcX5AP-UPD4lKZQuHcoBLgdLV6WWqAPKeIvy6F7ST6w20Zc8pLh-jjq8rio7aJAU9BR6X_sC_EBWNV7QSkw/s320/IMG_20210103_145737_627.jpg" width="320" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br /&gt;

&lt;br /&gt;&lt;h2 style="text-align: center;"&gt;&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('indirme kod')"&gt;indirme kod&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style="text-align: center;"&gt;&lt;div class="commenthidden" id="indirme kod"&gt;&lt;a href="https://lnkload.com/2vb7h" target="_blank"&gt;Dowload&lt;/a&gt;&lt;/div&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt; 
&lt;div style="background: #f56ffaa; border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; text-align: left; width: auto;"&gt;
&lt;h1 style="line-height: 250%; margin: 0px; text-align: center;"&gt;&lt;a href="https://www.youtube.com/channel/UCkvsog5tDTpt5ITNFrISKEg"&gt;&lt;b&gt;KULOGLUELEKTRONİK&lt;/b&gt;&lt;/a&gt;&lt;/h1&gt; 
&lt;/div&gt;
&lt;br /&gt;
&lt;h1 style="text-align: center;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;PROJE VİDEOSU&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="400" src="https://www.youtube.com/embed/6Pi0SG2LmTE" width="650"&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;br /&gt; &lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4tQs1Gcq92alJ1SChLpWbwJlydtJmu6Xq4xud41_Juxdd-cp6uBbQvWaO2piZpDCyzi7ftTmeDbw8aDBOzdV8psUl76D2e1vXsDkVqRaR_O7f5GAQ7k5VNlaFyHpyb928wkM3pcD2H0U/s72-w400-h281-c/Untitled+Sketch+2_bb.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>DHT11 sıcaklık ve nem sensörlü TM1637  Termometre Yapımı</title><link>https://kulogluelektronik.blogspot.com/2021/01/dht11-scaklk-ve-nem-sensorlu-tm1637.html</link><category>Arduino</category><category>Thermometer</category><pubDate>Thu, 7 Jan 2021 04:13:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-5334186420925855716</guid><description>&lt;h4 style="background-color: white; box-sizing: inherit; line-height: 1.4em; margin: 0px 0px 20px; text-align: left;"&gt;&lt;span style="color: #222222; font-family: Roboto; font-size: 30px; font-weight: normal;"&gt;Thermometer example: TM1637 4-digit 7-segment&lt;/span&gt;&lt;/h4&gt;&lt;h4 style="background-color: white; box-sizing: inherit; line-height: 1.4em; margin: 0px 0px 20px; text-align: left;"&gt;&lt;span style="color: #222222; font-family: Roboto; font-size: 30px; font-weight: normal;"&gt;&amp;nbsp;display with DHT11 temperature and humidity sensor&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;4-Digit 7-segment displays are great for displaying sensor readings like temperature, humidity, voltage or speed. In the following example, I will show you how you can display temperature readings on the TM1637 display.&lt;/p&gt;&lt;p&gt;We will be using the popular DHT11 temperature and humidity sensor.&lt;/p&gt;&lt;p&gt;The wiring diagram below shows you how you can connect the DHT11 sensor in combination with the TM1637 display to the Arduino.&lt;/p&gt;&lt;p&gt;Note that the TM1637 display is connected in the same way as before.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjabCXTTxCocm6wDE3dl6KQ1gFr1FqbY3GTYjfGhU8QLU3zg41kuM51cAv3EPJ3OrKG2W6cVLQMrtN4M223r9-8WL-_CWsuiY1XjP0Mj26z0lC-ZOs18svAzLK2q5AQXiWOY2nZ9GS9x08/s1441/Esquema+termometro.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="997" data-original-width="1441" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjabCXTTxCocm6wDE3dl6KQ1gFr1FqbY3GTYjfGhU8QLU3zg41kuM51cAv3EPJ3OrKG2W6cVLQMrtN4M223r9-8WL-_CWsuiY1XjP0Mj26z0lC-ZOs18svAzLK2q5AQXiWOY2nZ9GS9x08/w400-h276/Esquema+termometro.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;span&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Bu yazıda size TM1637 4 basamaklı 7 segmentli ekranı Arduino ile nasıl kullanabileceğinizi gösterdim. Bir saat ve termometre örneğine de baktık. Umarım yararlı ve bilgilendirici bulmuşsunuzdur. Yaptıysanız, lütfen elektronik yapmayı ve bir şeyler yapmayı seven bir arkadaşınızla paylaşın!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Bu ekranları sensör okumalarını veya bir motorun hızı gibi şeyleri göstermek için kullanmayı gerçekten seviyorum. TM1637Display kitaplığıyla, ekranları programlamak çok kolay hale gelir, bu nedenle bir sonraki projenize bir tane dahil etmemeniz için hiçbir neden yoktur.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Bu ekranla hangi projeleri inşa etmeyi planladığınızı (veya daha önce inşa ettiğinizi) bilmek isterim. Herhangi bir sorunuz, öneriniz varsa veya bu eğitimde bir şeylerin eksik olduğunu düşünüyorsanız, lütfen aşağıya bir yorum bırakın.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;
  
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;h2 style="text-align: center;"&gt;&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('indirme kod')"&gt;indirme kod&lt;/a&gt;&lt;br /&gt;
&lt;div class="commenthidden" id="indirme kod"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;a href="https://lnkload.com/2vb7k" target="_blank"&gt;Dowload&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;br /&gt;
  
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;h1 style="line-height: 250%; margin: 0px; text-align: center;"&gt;&lt;a href="https://www.youtube.com/channel/UCkvsog5tDTpt5ITNFrISKEg"&gt;&lt;b&gt;KULOGLUELEKTRONİK&lt;/b&gt;&lt;/a&gt;&lt;/h1&gt; 
&lt;/div&gt;
&lt;br /&gt;
&lt;h1 style="text-align: center;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;PROJE VİDEOSU&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="400" src="https://www.youtube.com/embed/gIiSWIaXbMM" width="650"&gt;&lt;/iframe&gt;
&lt;br /&gt;
&lt;br /&gt; </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjabCXTTxCocm6wDE3dl6KQ1gFr1FqbY3GTYjfGhU8QLU3zg41kuM51cAv3EPJ3OrKG2W6cVLQMrtN4M223r9-8WL-_CWsuiY1XjP0Mj26z0lC-ZOs18svAzLK2q5AQXiWOY2nZ9GS9x08/s72-w400-h276-c/Esquema+termometro.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Arduino 4-Digit &amp; RTC module Clock </title><link>https://kulogluelektronik.blogspot.com/2021/01/arduino-4-digit-rtc-module-clock.html</link><category>Arduino</category><category>sensor</category><pubDate>Mon, 4 Jan 2021 11:52:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-4368148779782379665</guid><description>&lt;div&gt;&lt;h3 id="toc-4-digit-clock-based-on-a-rtc-module-0" style="background-color: white; box-sizing: border-box; color: #171e21; font-family: &amp;quot;typonine sans regular&amp;quot;; font-size: 27px; letter-spacing: 0.3px; line-height: 31px; margin: 0px 0px 20px; padding: 0px;"&gt;&lt;span style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;4-Digit Clock based on a RTC module&lt;/span&gt;&lt;/h3&gt;&lt;p style="background-color: white; box-sizing: border-box; font-family: &amp;quot;typonine sans regular&amp;quot;; font-size: 18px; letter-spacing: 0.3px; line-height: 1.4em; margin: 0.5em 0px; padding: 0px;"&gt;&lt;span style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;I have got a DS1302&amp;nbsp;&lt;/span&gt;&lt;em style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;Real Time Clock Module&lt;/em&gt;&lt;span style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&amp;nbsp;with&amp;nbsp;&lt;/span&gt;&lt;em style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;Battery&lt;/em&gt;&lt;span style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&amp;nbsp;Backup, and I was eager&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; box-sizing: border-box; font-family: &amp;quot;typonine sans regular&amp;quot;; font-size: 18px; letter-spacing: 0.3px; line-height: 1.4em; margin: 0.5em 0px; padding: 0px;"&gt;&lt;span style="box-sizing: border-box; margin: 0px; padding: 0px;"&gt;&amp;nbsp;to making a digital clock. As I also had a 7-segment 4-digit display, I was looking for the best way to make that clock. But I was always reluctant to use this type of display, because of the amount of wires it requires.&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; box-sizing: border-box; font-family: &amp;quot;typonine sans regular&amp;quot;; font-size: 18px; letter-spacing: 0.3px; line-height: 1.4em; margin: 0.5em 0px; padding: 0px;"&gt;Then, "digital tube" 4-wire 4-digit display came across, and I knew that was the solution I was searching for. Now I had all the pieces of my little system.&lt;/p&gt;&lt;span&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/span&gt;&lt;p style="background-color: white; box-sizing: border-box; font-family: &amp;quot;typonine sans regular&amp;quot;; font-size: 18px; letter-spacing: 0.3px; line-height: 1.4em; margin: 0.5em 0px; padding: 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUaprjeu1uDBLME4eNNwHyuRXofBnMX7jSM_jlqbgBpir3PZhHi7Dn5A-KJjPaAi5WIqreBgkd9KXqGZIhjiiPmnIguJdJuwrOngfgkxvqAiNhhyphenhyphen4yr6kn4OzM9Ejs21aEXiD8y30lM38/s849/2ZaLM7vMRtsJ5P7EnvnJ.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="637" data-original-width="849" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUaprjeu1uDBLME4eNNwHyuRXofBnMX7jSM_jlqbgBpir3PZhHi7Dn5A-KJjPaAi5WIqreBgkd9KXqGZIhjiiPmnIguJdJuwrOngfgkxvqAiNhhyphenhyphen4yr6kn4OzM9Ejs21aEXiD8y30lM38/w400-h300/2ZaLM7vMRtsJ5P7EnvnJ.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs5n2ysIV4FbIq1wRInejUtM43J3Iids_3K-nGyvf_Au9F-upVeKLsJNH_FX32zUMew3g9T2Eaytrf3om-jg4zpyBrNhaq1d1GFQ7NaH10nSZrfrjxRK6a_t11-e0zyDVduNe9O8zalaQ/s1000/4lu_7_segment_tm1637_kirmizi_display_modulu_28686_84_B-1000x1000.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1000" data-original-width="1000" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs5n2ysIV4FbIq1wRInejUtM43J3Iids_3K-nGyvf_Au9F-upVeKLsJNH_FX32zUMew3g9T2Eaytrf3om-jg4zpyBrNhaq1d1GFQ7NaH10nSZrfrjxRK6a_t11-e0zyDVduNe9O8zalaQ/w400-h400/4lu_7_segment_tm1637_kirmizi_display_modulu_28686_84_B-1000x1000.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQQKLX5MVwDRMglZHr2YHzSbDl7_Qhows26W_dWgaEBw2Z_fbUZNHTtdWzknmkes6HFktMXuTKaqH1LNe0XTD4oFmMKlP6IwHkoacnjIApg80V4BXrUn_ZJHRgQq6z3TWg4QtNiIlC-6g/s800/ds1307-rtc-module-india-800x800.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="800" data-original-width="800" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQQKLX5MVwDRMglZHr2YHzSbDl7_Qhows26W_dWgaEBw2Z_fbUZNHTtdWzknmkes6HFktMXuTKaqH1LNe0XTD4oFmMKlP6IwHkoacnjIApg80V4BXrUn_ZJHRgQq6z3TWg4QtNiIlC-6g/w400-h400/ds1307-rtc-module-india-800x800.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style="background-color: white; box-sizing: border-box; font-family: &amp;quot;typonine sans regular&amp;quot;; font-size: 18px; letter-spacing: 0.3px; line-height: 1.4em; margin: 0.5em 0px; padding: 0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="400" src="https://www.youtube.com/embed/M9I565qvUYs" width="600"&gt;&lt;/iframe&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style="text-align: center;"&gt;&lt;span style="color: red;"&gt;&amp;nbsp;dowload&lt;/span&gt;&lt;/h2&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUaprjeu1uDBLME4eNNwHyuRXofBnMX7jSM_jlqbgBpir3PZhHi7Dn5A-KJjPaAi5WIqreBgkd9KXqGZIhjiiPmnIguJdJuwrOngfgkxvqAiNhhyphenhyphen4yr6kn4OzM9Ejs21aEXiD8y30lM38/s72-w400-h300-c/2ZaLM7vMRtsJ5P7EnvnJ.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Arduino battery capacity tester</title><link>https://kulogluelektronik.blogspot.com/2020/03/arduino-battery-capacity-tester.html</link><category>Arduino</category><category>Şarj</category><pubDate>Sun, 15 Mar 2020 05:46:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-4712709965535602328</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
My first Arduino project was to build a battery capacity tester. I’ve got a box of rechargeable AA batteries, and it seams they’ve been less and less effective. Since most applications require 4 batteries, invariably one problem battery makes the rest of them look bad.&lt;br /&gt;
&lt;br /&gt;
The Atmel ATMega328 microcontroller has 6 analog inputs with 10-bit A-to-D converters and a external AREF that allows you to define what voltage 0x3FF represents. In other words, it’ll give you ~1.4mV precision measuring 0-1.5V when given a 1.5V analog reference. Plenty accurate for a battery capacity measurement.&lt;br /&gt;
&lt;br /&gt;
The principle is fairly simple. Apply a known load to a battery, record the voltage periodically while the battery discharges, stop recording at some point, and integrate to arrive at the area under the curve in order to derive the amp-hours delivered from the battery.&lt;br /&gt;
&lt;br /&gt;
Enough theory, let’s see how it works. The UI starts with a helpful message:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Insert Battery&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9AaowReEAP8Vv_DnG-OJ-vw8KCHrEFbdkh1YvcmSWvVlPFmMzM-hZNrV6RXIPMtIUACY6H95M7DkY-ZR00aox2s-NDwHRfoJNJ3uJa_bapLoDR6My4bF3Tv15mTdTakSTthZtWZfeP4c/s1600/20091107215531_DSC_4782.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="700" data-original-width="696" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9AaowReEAP8Vv_DnG-OJ-vw8KCHrEFbdkh1YvcmSWvVlPFmMzM-hZNrV6RXIPMtIUACY6H95M7DkY-ZR00aox2s-NDwHRfoJNJ3uJa_bapLoDR6My4bF3Tv15mTdTakSTthZtWZfeP4c/s400/20091107215531_DSC_4782.jpg" width="397" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
While the battery discharges, the UI prints the voltage, real-time capacity measured thus far, and the duration that the measurement has been taking place.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Battery In&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg29K2Ae8UHacYBMEo1pzLo8IjGJpXMDWM4ctw44RoncIS8XnoiPTDyGUyR2jGEZ9i2BfE75bhUgPEFn1XSzPgYIMXInm4aSXL_RjBOfxGvZCzbOwpCOPoLf79pGh0jqhtIjyv-So5ICnI/s1600/20091107221459_DSC_4783.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="700" data-original-width="671" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg29K2Ae8UHacYBMEo1pzLo8IjGJpXMDWM4ctw44RoncIS8XnoiPTDyGUyR2jGEZ9i2BfE75bhUgPEFn1XSzPgYIMXInm4aSXL_RjBOfxGvZCzbOwpCOPoLf79pGh0jqhtIjyv-So5ICnI/s400/20091107221459_DSC_4783.jpg" width="382" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
When the cut-off voltage of 0.9V has been reached, the “usable” capacity is saved at the top. The real-time data continues so the capacity below 0.9V is measured. For the NiMH batteries I’ve tested, the capacity below 0.9V is minimal (~100mAH).&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
After the cut-off is reached, an LED starts blinking to attract attention that the test is effectively over.&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;Done&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ_JyfaMSJ7lwBYBs3Daqnd54MlUB0_-RKZptKk66t7qPNk4IFpWS9s6oPv56KozgKQNMHbHDgR8XG6UPb2J76B1rwFGF0kQtJ65lYw4_rgfWUTkHb46vtFck8ub61Qr6iOilkBYOzfKs/s1600/20091107215454_DSC_4780.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="700" data-original-width="494" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ_JyfaMSJ7lwBYBs3Daqnd54MlUB0_-RKZptKk66t7qPNk4IFpWS9s6oPv56KozgKQNMHbHDgR8XG6UPb2J76B1rwFGF0kQtJ65lYw4_rgfWUTkHb46vtFck8ub61Qr6iOilkBYOzfKs/s400/20091107215454_DSC_4780.jpg" width="281" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b style="text-align: left;"&gt;&lt;a href="https://lnkload.com/2vb7x" target="_blank"&gt;DOWLOAD&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;
Schematics, excluding the LCD display..&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghoWguqfyXwBph-tgw2Ol_Nvs-2SDm9kC3yElBd0_09mrGgDAWGkpJ_B7npxxsIAVFDTr3Hs8s0cgiPaQ1-fpRx34IQ10LRpWkXSVjrNEyZu4OXG1Eevk3Yb0OJVN9y51IhJnVtcAny6U/s1600/capacity_meter_bb.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="341" data-original-width="589" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghoWguqfyXwBph-tgw2Ol_Nvs-2SDm9kC3yElBd0_09mrGgDAWGkpJ_B7npxxsIAVFDTr3Hs8s0cgiPaQ1-fpRx34IQ10LRpWkXSVjrNEyZu4OXG1Eevk3Yb0OJVN9y51IhJnVtcAny6U/s1600/capacity_meter_bb.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-K3X9WgMrtx6b6mr_leJALvNtKGuYYn__LvPgAxZHoyuiNoK6kybk8kqIAWbvrCTJw9C1DW5EedvKp3Tyo3IFTNle4imt1WiTnay8NXseL41FN2Q6r3Pb0tkAdnJJ85YAFfGGeXFLlb8/s1600/capacity_meter_schem.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="578" data-original-width="614" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-K3X9WgMrtx6b6mr_leJALvNtKGuYYn__LvPgAxZHoyuiNoK6kybk8kqIAWbvrCTJw9C1DW5EedvKp3Tyo3IFTNle4imt1WiTnay8NXseL41FN2Q6r3Pb0tkAdnJJ85YAFfGGeXFLlb8/s1600/capacity_meter_schem.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0px;"&gt;https://kulogluelektronik.blogspot.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://kulogluelektronik.blogspot.com/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9AaowReEAP8Vv_DnG-OJ-vw8KCHrEFbdkh1YvcmSWvVlPFmMzM-hZNrV6RXIPMtIUACY6H95M7DkY-ZR00aox2s-NDwHRfoJNJ3uJa_bapLoDR6My4bF3Tv15mTdTakSTthZtWZfeP4c/s72-c/20091107215531_DSC_4782.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Buck Boost Regulator using XL6009 </title><link>https://kulogluelektronik.blogspot.com/2020/03/buck-boost-regulator-using-xl6009-with.html</link><category>Devre</category><category>Voltaj</category><pubDate>Sat, 14 Mar 2020 12:31:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-6203951814835042406</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Buck Boost Regulator using XL6009 with Adjustable 3.3V to 12V Output Voltage&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Buck-Boost regulator is made using two different topologies, as the name suggests, it consists of both buck and boost topology. We already know that Buck Regulator Topology provides a lower magnitude of output voltage than the input voltage, while a Boost Regulator Topology provides a higher magnitude of output voltage than the provided input voltage. We have already built a 12V to 5V Buck Converter and a 3.7V to 5V Boost converter Circuit using the popular MC34063. But at times, we might need a circuit that can both work as a buck and a boost regulator.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKp2M0VkCRM0HmRnTwBjRkVy1YhdFUPqkoF3ReihT4DoqiUrcyTDKxXmN_KBD3W1yEwaMaWMH6Mduu9Q2J1NPDuAUrM7slgn0fXzLX-Brd9ghqF5q8hiBoQhDhKUXvX3kd59y93MDCDDU/s1600/XL6009-Buck-Boost-Regulator.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="500" data-original-width="750" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKp2M0VkCRM0HmRnTwBjRkVy1YhdFUPqkoF3ReihT4DoqiUrcyTDKxXmN_KBD3W1yEwaMaWMH6Mduu9Q2J1NPDuAUrM7slgn0fXzLX-Brd9ghqF5q8hiBoQhDhKUXvX3kd59y93MDCDDU/s400/XL6009-Buck-Boost-Regulator.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Say, for example, if your device is powered using a lithium battery, then the input voltage range will be between 3.6V to 4.2V. If this device needs two operating voltage 3.3V and 5V. Then you need to design a buck-boost regulator that will regulate the voltage from this lithium battery into 3.3V and 5V. So, in this tutorial, we will learn how to build a simple buck-boost regulator and test it on a breadboard for the ease of building. This regulator is designed to work with a 9V battery and can provide a wide output voltage ranging from 3.3V to 12V with a maximum output current of 4A.&lt;br /&gt;
&lt;b&gt;&lt;span style="color: orange; font-size: large;"&gt;Components Required&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Xl6009&lt;br /&gt;
10k preset&lt;br /&gt;
33uH inductor - 2pcs&lt;br /&gt;
1n4007 - 2pcs&lt;br /&gt;
SR160 - 1pc (for max 800mA output)&lt;br /&gt;
10uH inductor&lt;br /&gt;
100uF Capacitor&lt;br /&gt;
1000uF capacitor -2pcs&lt;br /&gt;
1uF ceramic or polyester film capacitor&lt;br /&gt;
9V power source (battery or adapter)&lt;br /&gt;
Breadboard&lt;br /&gt;
Wires for breadboard.&lt;br /&gt;
&lt;b&gt;&lt;span style="color: orange; font-size: large;"&gt;XL6009 Buck-Boost Regulator IC&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
There are many ways to build a buck-boost circuit, for the sake of this tutorial, we will be using the famous XL6009 DC/DC Converter IC. We have selected this IC because of its ease of availability and beginner-friendly nature. You can also check the article on how to select switching regulator IC to help you with other regulator selection for your switching designs.&lt;br /&gt;
&lt;br /&gt;
The main component is the switching regulator XL6009. The pinout of XL6009 and the specifications are shown in the below image.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2qTRFnHdt-JPH-T6HjTO6MAu5vDFo1evQU4vDS2D5PqRZZn1xif2ENM-km2vy9hO3aoa7Tnk71iY1mhT_LOeTXIIDCocxkm_ZYRY29IpLDiACih2bJ433idVtFfRZE3Bs9kq5n_0uxJU/s1600/XL6009-Pinout.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="500" data-original-width="750" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2qTRFnHdt-JPH-T6HjTO6MAu5vDFo1evQU4vDS2D5PqRZZn1xif2ENM-km2vy9hO3aoa7Tnk71iY1mhT_LOeTXIIDCocxkm_ZYRY29IpLDiACih2bJ433idVtFfRZE3Bs9kq5n_0uxJU/s400/XL6009-Pinout.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
The metal tab is internally connected with the Switching pin of the XL6009 driver ic. The pin description is also given in the above table. The important technical specifications of XL6009 IC is given below&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;span style="color: orange; font-size: large;"&gt;&lt;b&gt;Features&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Wide 5V to 32V Input Voltage Range&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Positive or Negative Output Voltage Programming with a Single Feedback Pin&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Current Mode Control Provides Excellent Transient Response&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
1.25V Reference Adjustable Version&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Fixed 400KHz Switching Frequency&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Maximum 4A Switching Current&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
SW PIN Built-in Over Voltage Protection&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Excellent Line and Load Regulation&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
EN PIN TTL Shutdown Capability&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Internal Optimize Power MOSFET&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
High Efficiency of up to 94%&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Built-in Frequency Compensation&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Built-in Soft-Start Function&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Built-in Thermal Shutdown Function&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Built-in Current Limit Function&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Available in TO263-5L Package&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
The above specification chart is showing that the minimum input voltage of this driver IC is 5V and the maximum is 32 Volt. Also, as the switching frequency is 400 kHz, it opens up possibilities to use smaller inductors for switching related purposes. Also, the driver IC supports a maximum of 4A output current which is great to cover up many high rated current related applications.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;b&gt;&lt;span style="color: orange;"&gt;Buck-Boost Converter Circuit using ​XL6009&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
For any switching regulator, the Inductor and the capacitor are the main components. The position of the Inductor and the capacitor in the circuit is very essential to provide the required power to the load during switch on and off condition. In this case, two inductors (l1 and L4) are used that will support buck and boost function individually in this switching circuit. The 33uH inductor that is L1, is the inductor which is responsible for the Buck mode of operation whereas the Inductor L2 is used for the Boost mode inductor. Here I have wound my own inductor using a ferrite core and enameled copper wire. If you are new to making your own inductor, you can check this article on the basics of inductor and Inductor coil design to get started. Once you have built your inductor, you can check its value using an LCD meter or if you don’t have an LCR meter, you can use your oscilloscope to find inductor value using the resonant frequency method.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
The input capacitors, C1 and C2 are used to filter transients and ripple from the external battery or the power source. The capacitor C3, 1uF, 100V is used for isolating these two inductors. There is a Schottky diode SR160 which is a one ampere, 60V diode used for converting the switching frequency cycle to a DC and the capacitor 1000uF, 35V is the filter capacitor used for filtering the output from the diode.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
As the Feedback threshold voltage is 1.25V, the voltage divider can be set according to this feedback voltage for configuring the actual output. For our circuit, we have used a pot (R1) and a resistor (R2) to provide the feedback voltage.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
R1 is a variable resistor which is used for setting the output voltage. The R1 and R2 form a voltage divider that provides feedback to the driver IC XL6009. 10uH inductor L4 and 100uF capacitor C3 are used as an LC filter.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;b&gt;&lt;span style="color: orange;"&gt;Buck-Boost Converter Construction and Working&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Other than the Inductor, all the components should be available easily. The XL6009 IC is not breadboard friendly. Hence, I have used the dotted board to connect the pins of XL6009 to male header pins as shown below.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKL1wuKq1aEt7Yx6sq2tHulJHPShBytzTV4dv2yljd9PT8dPB2LiDImt7DeadIlkFGa7r38UbYHCw6p7TdA_8oVVXhXjoC4pAp7ErqEbFAycL1qiKGRxFrliJWZfXxiphcQQnwRS2Keb4/s1600/XL6009-IC.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="320" data-original-width="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKL1wuKq1aEt7Yx6sq2tHulJHPShBytzTV4dv2yljd9PT8dPB2LiDImt7DeadIlkFGa7r38UbYHCw6p7TdA_8oVVXhXjoC4pAp7ErqEbFAycL1qiKGRxFrliJWZfXxiphcQQnwRS2Keb4/s1600/XL6009-IC.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Build the inductor as discussed earlier and create your circuit. I have used a breadboard to make things easy but a perf board is recommended. Once complete my circuit on breadboard looked like this.&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEJtkR0ndeYNZLUsRXEenw3Xg3XLo5Y4tI3JcZWO2GLQC9SNjackeeX79NRFjzP5ZyxscWl2oXfTZv5_Bb5KhwvaYfnLv00UtUwBtmCtIdJsFJDWgrrEt02FIX6acM_l_sAV6-iKfP2_Q/s1600/Buck-Boost-Converter.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="500" data-original-width="750" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEJtkR0ndeYNZLUsRXEenw3Xg3XLo5Y4tI3JcZWO2GLQC9SNjackeeX79NRFjzP5ZyxscWl2oXfTZv5_Bb5KhwvaYfnLv00UtUwBtmCtIdJsFJDWgrrEt02FIX6acM_l_sAV6-iKfP2_Q/s400/Buck-Boost-Converter.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
The output voltage can be set from 3.3V to 12V using the potentiometer. Technically, the circuit can be designed for a high output current as much as 4A. But, due to the limitation of the output diode, the circuit is not tested in a full load. The output load is set to a decent value of approximately 700-800mA of current. You can change the output diode to increase the output current if required.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
To test our power supply circuit, we have used a multimeter to monitor the output voltage and for the load, we have used the DC electronic load something similar to what we build earlier. If you do not have an electronic load, you can use any load of your choice and monitor current using a multimeter. The complete testing video is given at the bottom of this page.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
It is also noticed that the output voltage is a bit fluctuating in a +/-5% margin. This is due to the high DCR value of inductors and the unavailability of the heat sink in the XL6009. Adequate heat sink and proper components can be useful for stable output. Overall, the circuit is working quite operational and performance is satisfactory. If you have any questions, leave them in the comment section, you can also use our forums for other technical questions.&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0px;"&gt;https://lnkload.com/2vb7U
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://lnkload.com/2vb7U/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKp2M0VkCRM0HmRnTwBjRkVy1YhdFUPqkoF3ReihT4DoqiUrcyTDKxXmN_KBD3W1yEwaMaWMH6Mduu9Q2J1NPDuAUrM7slgn0fXzLX-Brd9ghqF5q8hiBoQhDhKUXvX3kd59y93MDCDDU/s72-c/XL6009-Buck-Boost-Regulator.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Arduino Tabanlı Kalp Atışı Modülü</title><link>https://kulogluelektronik.blogspot.com/2020/03/arduino-tabanl-kalp-ats-modulu.html</link><category>Arduino</category><category>sensor</category><pubDate>Sat, 14 Mar 2020 12:15:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-7014518029256774795</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Kalp atış hızı , vücut ısısı ve kan basıncı izleme, insan vücudunun çok önemli parametreleridir. Doktorlar ateş veya vücut sıcaklığını kontrol etmek için termometre, kan basıncı ölçümü için BP monitörü ve kalp atış hızı ölçümü için nabız monitörü gibi çeşitli tıbbi cihazlar kullanır. Bu projede, bir dakika içinde kalp atışı sayısını sayan Arduino tabanlı bir kalp atışı monitörü inşa ettik . Burada , sensöre parmağınızı koyduğunuzda kalp atışını algılayan bir kalp atışı sensörü modülü kullandık.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRQ_GDZx8M6BTsfgOuIuVHVushJi_A16QawetX6ULJXP9al9zOaiUiPfNev0BSdt5Y7hDHdrVOCxsIxF7EZeVCYRVQs-GtvhM6AVh6HCNX6mlRY2t7qfEvwjEyYfcKM4tFom4-qw_Yc8/s1600/Arduino-Heart-Beat-Counter.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="528" data-original-width="650" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRQ_GDZx8M6BTsfgOuIuVHVushJi_A16QawetX6ULJXP9al9zOaiUiPfNev0BSdt5Y7hDHdrVOCxsIxF7EZeVCYRVQs-GtvhM6AVh6HCNX6mlRY2t7qfEvwjEyYfcKM4tFom4-qw_Yc8/s320/Arduino-Heart-Beat-Counter.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Bileşenler&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Arduino&lt;br /&gt;
Kalp Atışı sensörü modülü&lt;br /&gt;
16x2 LCD&lt;br /&gt;
Butona basınız&lt;br /&gt;
Ekmek tahtası&lt;br /&gt;
Güç&lt;br /&gt;
Bağlantı kabloları&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Kalp Atışı Monitörü Çalışması Projesi&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Bu projenin çalışması oldukça kolaydır, ancak kalp atış hızını hesaplamak için küçük bir hesaplama gereklidir. Kalp atış hızını hesaplamak için çeşitli yöntemler vardır, ancak burada sadece beş nabız okuduk. Ardından, aşağıdaki formülü uygulayarak toplam kalp atışını bir dakika içinde hesapladık:&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Devre Şeması ve Açıklama&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Arduino uno, kalp atışı sensörü modülü, sıfırlama düğmesi ve LCD içeren kalp atışı monitörü devresi aşağıda gösterilmiştir. Arduino, Kalp atışı sensörü modülünden gelen atımları okumak, kalp atış hızını hesaplamak ve bu verileri LCD'ye göndermek gibi sistemin tüm sürecini kontrol eder. Bu modülün hassasiyetini, bu modül üzerine yerleştirilmiş dahili potansiyometre ile ayarlayabiliriz.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1-odJ03_aW4C1M9To2WwlabqtGBVr39XIFUPu8_ZLyWq20o0V6owxuKau1YIJEQ7P84zUqrfcPWUikOCnLtk20tMvl3S-DC6snKHI9qL79kosyMa4Qds4zjIb_4c78xNVHRJpTkWemOs/s1600/Heartbeat-Counter-Circuit-u.gif" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="620" data-original-width="1026" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1-odJ03_aW4C1M9To2WwlabqtGBVr39XIFUPu8_ZLyWq20o0V6owxuKau1YIJEQ7P84zUqrfcPWUikOCnLtk20tMvl3S-DC6snKHI9qL79kosyMa4Qds4zjIb_4c78xNVHRJpTkWemOs/s320/Heartbeat-Counter-Circuit-u.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;span style="color: orange; font-size: x-large;"&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;a href="https://lnkload.com/2vb8f" target="_blank"&gt;kod&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRQ_GDZx8M6BTsfgOuIuVHVushJi_A16QawetX6ULJXP9al9zOaiUiPfNev0BSdt5Y7hDHdrVOCxsIxF7EZeVCYRVQs-GtvhM6AVh6HCNX6mlRY2t7qfEvwjEyYfcKM4tFom4-qw_Yc8/s72-c/Arduino-Heart-Beat-Counter.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Arduino and LCD- 0 Volt -- 1000 Volt</title><link>https://kulogluelektronik.blogspot.com/2020/03/arduino-and-lcd-0-volt-1000-volt.html</link><category>Arduino</category><category>Devre</category><category>Dijital Voltmetre</category><pubDate>Sat, 14 Mar 2020 12:03:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-716973433933436699</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Abstract&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
The Arduino inbuilt 10 bit ADC, can be used for constructing / measuring the 0 Volt to 1000 Volt user selectable Digital Volt Meter. The 16x2 LCD display driver, connected with Arduino Uno will be used for displaying the measured voltage. This voltmeter can read only DC voltage.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0Ayx-h2tnqqPEDHNVkH79YZXG95Hp80Apm1sWTLEex72ZqvHU5vJPFsGkD-214nXIfAK3YNAnhY0K3hyphenhyphenwGAgTCiVghOiS4jREQl7d-wBP3SoFLrfXwaBKXPhMKUN6jwpVE3v4k2FMDJ4/s1600/FW3TNWPIQTTC4PV.LARGE.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="547" data-original-width="911" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0Ayx-h2tnqqPEDHNVkH79YZXG95Hp80Apm1sWTLEex72ZqvHU5vJPFsGkD-214nXIfAK3YNAnhY0K3hyphenhyphenwGAgTCiVghOiS4jREQl7d-wBP3SoFLrfXwaBKXPhMKUN6jwpVE3v4k2FMDJ4/s320/FW3TNWPIQTTC4PV.LARGE.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style="color: red;"&gt;&lt;b&gt;Parts and components&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Arduino Uno board&lt;br /&gt;
&lt;br /&gt;
16x2 LCD = 1 No&lt;br /&gt;
&lt;br /&gt;
1K Potentiometer = 1 No&lt;br /&gt;
&lt;br /&gt;
4 Way, 2 Pole Rotary switch = 1 No&lt;br /&gt;
&lt;br /&gt;
Resistor 10 K = 4 Nos&lt;br /&gt;
&lt;br /&gt;
Resistor 1 K = 1 No&lt;br /&gt;
&lt;br /&gt;
Resistor 9 K = 1 No&lt;br /&gt;
&lt;br /&gt;
Resistor 90 K = 1 No&lt;br /&gt;
&lt;br /&gt;
Resistor 900 K = 1 No&lt;br /&gt;
&lt;br /&gt;
IN5913B 3.3 Volt Zener diode = 1 No&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: orange; font-size: large;"&gt;&lt;b&gt;Step 1: Schematic&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrJBeNT8FnbQDglacwWhA9VBUhxPZzbyCx2KzVXqFzeQ2rHYwJzs1m77C5uK4LQ1iaqesFZQtOxN801-egupoT7x9QfHd6PL5cKEOnS5XDnyUfPg6KDbAQTIdbuQ08kStfWIcG0CSQUiQ/s1600/FMWC6RMIQTTC4PC.LARGE.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="700" data-original-width="943" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrJBeNT8FnbQDglacwWhA9VBUhxPZzbyCx2KzVXqFzeQ2rHYwJzs1m77C5uK4LQ1iaqesFZQtOxN801-egupoT7x9QfHd6PL5cKEOnS5XDnyUfPg6KDbAQTIdbuQ08kStfWIcG0CSQUiQ/s320/FMWC6RMIQTTC4PC.LARGE.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
The 16x2 is very common type LCD, with two rows, and each row displays 16 characters of either 5x7 or 5x8 dot matrix characters.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
The LCD is available in a 16 pin package. It consists of back light and contrast adjustment function and each dot matrix has 5×8 dot resolution.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
The 16x2 LCD display is connected to the Arduino (13,12,11,10,9 and 8) digital IO pins, where LCD operates at 4 bit data mode.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
If the display is not visible, adjust the Contrast pot (1K), to make it visible.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
A Rotary switch operates by rotation of its spindle / shaft. Rotary switches are chosen when more than 2 positions are needed.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
A four way, two pole rotary switch used for this design. One pole is connected to the voltage divider network and then A0 analog input pin of Arduino.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
And another pole is connected to 5,4,3 and 2 Digital IO pins, used for selecting the DVM range Voltage divider circuit is used to divide voltage into two parts (measurement and drop).&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Internal Vref (1100 mV) of Arduino is selected for measurement.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
IN5913B 3.3 Volt Zener diode, at A0 pin, will product the Arduino, from over voltage inputs.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
ADC Resolution = Vref / (1024 -1).&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
ADC Resolution = 1.1 V / 1023 = 1100mV / 1023 = 1.075 mV.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;1000 mVolt Scale&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
0 to 1 Volt measurement voltage is directly fed to A0 analog input.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
There is no potential divider is used for measuring the 0 to 1Volt.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
If Vin is 1 Volt then Vmeasurment = 1.0 V = 1000 mV.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
DVM Resolution = (1.1 / 1023) 1 Volt = 1.075 mV.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;10 Volt Scale&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
0 to 10 Volt measurement voltage is fed to A0 analog input, through potential divider (R19 : R7) (1K and 9K).&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
If Vin is 10 Volt then Vmeasurment = 10 (1K / 10K) = 1000 mV.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
DVM Resolution = (1.1 / 1023) 10 Volt = 10.75 mV.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;100 Volt Scale&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
0 to 100 Volt measurement voltage is fed to A0 analog input, through potential divider (R19 : R7+R8) (1K and (9K+90K)).&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
If Vin is 100 Volt then Vmeasurment = 100 (1K / 100K) = 1000 mV.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
DVM Resolution = (1.1 / 1023) 100 Volt = 107.52 mV.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;1000 Volt Scale&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
0 to 1000 Volt measurement voltage is fed to A0 analog input, through potential divider (R19 : R7+R8+R5) (1K and (9K+90K+900K)).&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
If Vin is 1000 Volt then Vmeasurment = 1000 (1K / 1000K) = 1000 mV.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
DVM Resolution = (1.1 / 1023) 1000 Volt = 1075.2 mV. = 1.075 Volt&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span style="color: orange; font-size: large;"&gt;Step 2: Software&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
The Arduino LiquidCrystal library is used for displaying the measured voltage at 16x2 LCD.&lt;br /&gt;
&lt;br /&gt;
The 1.1V internal reference is chosen for the ADC.&lt;br /&gt;
&lt;br /&gt;
The voltage divider will, provide the input voltage between 0 to 1100mV.&lt;br /&gt;
&lt;br /&gt;
Hence the software will measure and display the values between 00.00 Volt to 1000.00 Volt, in accordance with the Scale selection.&lt;br /&gt;
&lt;br /&gt;
Sine 4 way 2 pole rotary switch is used, the Scale selection and voltage divider selection happens in parallel.&lt;br /&gt;
&lt;br /&gt;
Initially the software will display the “DC Volt meter” for about one second.&lt;br /&gt;
&lt;br /&gt;
If over voltage is fed, the software will display the over voltage indication too (&amp;gt; 1 mVolt, &amp;gt; 10 Volt, &amp;gt; 100 Volt, &amp;gt; 1000 Volt).&lt;br /&gt;
&lt;br /&gt;
10 bit ADC reading is mapped to 1100 mV, which is the Vref mille volt.&lt;br /&gt;
&lt;br /&gt;
Every 500 mSec the ADC is polled and displays the new reading.&lt;br /&gt;
&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('gizlenmis kod')"&gt;gizlenmis kod&lt;/a&gt;&lt;br /&gt;
&lt;div class="commenthidden" id="gizlenmis kod"&gt;
&lt;br /&gt;
&lt;h1 style="text-align: left;"&gt;&lt;a href="https://lnkload.com/2vb8n" target="_blank"&gt;dowload&lt;/a&gt;&lt;/h1&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span style="color: orange; font-size: large;"&gt;Step 3: Conclusion&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKcRqCmFn9Bn_yYsYAqye2QfdDJjHyR-BWu9o3BxxesyzFIKLi_NLF8rNamppt2P9OMKC_WVL4xlpmY_YwA1kV12i_ny1kgYyHAy9T80RA1yCNJRl8YcZV6LZBtGmxtsK7MR4XbnhxcZA/s1600/F91VTQMIQU0Q79H.LARGE.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="554" data-original-width="401" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKcRqCmFn9Bn_yYsYAqye2QfdDJjHyR-BWu9o3BxxesyzFIKLi_NLF8rNamppt2P9OMKC_WVL4xlpmY_YwA1kV12i_ny1kgYyHAy9T80RA1yCNJRl8YcZV6LZBtGmxtsK7MR4XbnhxcZA/s320/F91VTQMIQU0Q79H.LARGE.jpg" width="231" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKIP9FeohTpZREMJsytcgVHiYO01CgFC20NmYVsSTADbJguKtYRQ4HOGmkT1gX66aPGbQGzDmaAoLdqeU6kmq3yh2QcWNqlPuNacSwBWJA6edx2LDg4o1ddxAx7Z5jEGtUcw9Z6jJfVu0/s1600/FNQ71V3IQU0Q79G.LARGE.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="544" data-original-width="406" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKIP9FeohTpZREMJsytcgVHiYO01CgFC20NmYVsSTADbJguKtYRQ4HOGmkT1gX66aPGbQGzDmaAoLdqeU6kmq3yh2QcWNqlPuNacSwBWJA6edx2LDg4o1ddxAx7Z5jEGtUcw9Z6jJfVu0/s320/FNQ71V3IQU0Q79G.LARGE.jpg" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF4it8SVNz2XytGX3ah0DMUNPAp_7TPO-pkp_JrCjMyDsecEM3p22ivnOhcP_72miKv6VPhmwdvBU_AWF9sYd7_T8QBIyht2SPZ2uUU2hNny206wzI1J9VgA50scHhUBj6DZ0DAVWEwY8/s1600/FSZ8HXPIQTZUC0V.LARGE.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="544" data-original-width="401" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF4it8SVNz2XytGX3ah0DMUNPAp_7TPO-pkp_JrCjMyDsecEM3p22ivnOhcP_72miKv6VPhmwdvBU_AWF9sYd7_T8QBIyht2SPZ2uUU2hNny206wzI1J9VgA50scHhUBj6DZ0DAVWEwY8/s320/FSZ8HXPIQTZUC0V.LARGE.jpg" width="235" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;b&gt;&lt;span style="color: orange; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
The project is successfully simulated by using the Proteus.&lt;br /&gt;
&lt;br /&gt;
The measured DC voltage is displayed 16x2 LCD display.&lt;br /&gt;
&lt;br /&gt;
Below illustration will demonstrate the accuracy and measured values.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0px;"&gt;https://kulogluelektronik.blogspot.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://kulogluelektronik.blogspot.com/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0Ayx-h2tnqqPEDHNVkH79YZXG95Hp80Apm1sWTLEex72ZqvHU5vJPFsGkD-214nXIfAK3YNAnhY0K3hyphenhyphenwGAgTCiVghOiS4jREQl7d-wBP3SoFLrfXwaBKXPhMKUN6jwpVE3v4k2FMDJ4/s72-c/FW3TNWPIQTTC4PV.LARGE.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>ARDUINO 50V DIGITAL VOLTMETER USING MAX7219</title><link>https://kulogluelektronik.blogspot.com/2020/03/arduino-50v-digital-voltmeter-using.html</link><category>Arduino</category><category>Devre</category><category>Dijital Voltmetre</category><pubDate>Sat, 14 Mar 2020 11:53:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-894265450940731026</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
M.Pugazhendi build a digital voltmeter using Arduino and MAX7219 display driver.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG4vbXEdidlSeTcSgIKMzwLj8zDvQilAwpqYWvxpol32eOLol8RwqoQlV-jVy5FjQNg4Jse8RvxPBFZ2z2sCGiV3NzSPvMqDn7hSiIBcXBJwgovpGOFcdBcZHnjZTldPZW2-INagzYiHk/s1600/FZDFEVDIQK3QS5F.MEDIUM.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="346" data-original-width="620" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG4vbXEdidlSeTcSgIKMzwLj8zDvQilAwpqYWvxpol32eOLol8RwqoQlV-jVy5FjQNg4Jse8RvxPBFZ2z2sCGiV3NzSPvMqDn7hSiIBcXBJwgovpGOFcdBcZHnjZTldPZW2-INagzYiHk/s320/FZDFEVDIQK3QS5F.MEDIUM.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The Arduino inbuilt 10 bit ADC, can be used for constructing / measuring the 0Volt to 50Volt Digital Volt Meter. Popular MAX7219 display driver, connected with Arduino Uno will be used for displaying the measured voltage. This voltmeter can read only DC voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Parts and components&lt;/b&gt;&lt;br /&gt;
Arduino Uno board&lt;br /&gt;
Max7219 4 Digit 7Segment Common cathode displays = 1 Nos&lt;br /&gt;
Or Max7219 assembled board&lt;br /&gt;
Resistor 27 K = 1 No&lt;br /&gt;
Resistor 1.2M = 1 No&lt;br /&gt;
IN5913B 3.3 Volt Zener diode = 1 No&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Arduino 50V digital Voltmeter using MAX7219 – [&lt;a href="https://www.instructables.com/id/Arduino-and-MAX7219-50-Volt-Digital-Volt-Meter/" target="_blank"&gt;Link&lt;/a&gt;]&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('gizlenmis kod')"&gt;gizlenmis kod&lt;/a&gt;&lt;br /&gt;
&lt;div class="commenthidden" id="gizlenmis kod"&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;b&gt;&lt;span style="color: #ffa400;"&gt;&lt;a href="https://lnkload.com/2vb8p" target="_blank"&gt;DOWLOAD&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="color: red;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;
The project is successfully simulated by using the Proteus.&lt;br /&gt;
The measured DC voltage is displayed 4 digit 7 segment display.&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0px;"&gt;https://kulogluelektronik.blogspot.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://kulogluelektronik.blogspot.com/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG4vbXEdidlSeTcSgIKMzwLj8zDvQilAwpqYWvxpol32eOLol8RwqoQlV-jVy5FjQNg4Jse8RvxPBFZ2z2sCGiV3NzSPvMqDn7hSiIBcXBJwgovpGOFcdBcZHnjZTldPZW2-INagzYiHk/s72-c/FZDFEVDIQK3QS5F.MEDIUM.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>4 digit, 7 segment Display</title><link>https://kulogluelektronik.blogspot.com/2020/03/4-digit-7-segment-display.html</link><category>Arduino</category><pubDate>Fri, 13 Mar 2020 21:57:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-2769206229445405242</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
I found a website that solves all the wiring and coding issues; A library, written by Dean Reading.&lt;br /&gt;
I downloaded the zip file, copied it to /usr/share/arduino/libraries/ and unzipped it (includes the .cpp, the .h and an example sketch). (The directory is correct for my Linux Mint 16 system).&lt;br /&gt;
&lt;br /&gt;
Given this library, the example code is simplicity itself.&lt;br /&gt;
I used the wiring listed on the webpage, which when interpreted gives us :&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;b style="color: red; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: small; text-align: left;"&gt;A 4 digit 7 segment LED display.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidSqJxFKe1Td-Jh3znupkS5OWwHALyI7_z06r49ecaTSm94-KovPC7jL1VXg7pUaFUsz1ofWlr0clri0XFDU-JynffkbqeN7UmDoJ23__TZldMPf34YLttFrllXAskWAgs4rVLo5WdxPw/s1600/4digit7segment_1.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="468" data-original-width="640" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidSqJxFKe1Td-Jh3znupkS5OWwHALyI7_z06r49ecaTSm94-KovPC7jL1VXg7pUaFUsz1ofWlr0clri0XFDU-JynffkbqeN7UmDoJ23__TZldMPf34YLttFrllXAskWAgs4rVLo5WdxPw/s320/4digit7segment_1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Pin 1 is the LED top row, left pin&lt;br /&gt;
Pin 7 is the LED bottom row, left pin.&lt;br /&gt;
&lt;br /&gt;
LED pin&amp;nbsp; &amp;nbsp; &amp;nbsp;- Arduino pin&lt;br /&gt;
---------&amp;nbsp; &amp;nbsp;-------------------&lt;br /&gt;
1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 1K2 resistor to 2&lt;br /&gt;
2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 6&lt;br /&gt;
3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 11&lt;br /&gt;
4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 1K2 resistor to 3&lt;br /&gt;
5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 1K2 resistor to 4&lt;br /&gt;
6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 7&lt;br /&gt;
&lt;br /&gt;
7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 10&lt;br /&gt;
8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 9&lt;br /&gt;
9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- 13&lt;br /&gt;
10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 8&lt;br /&gt;
11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 12&lt;br /&gt;
12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 1K2 resistor to 5&lt;br /&gt;
However, wired up and the sketch uploaded, all I got was swift random flickering from the display.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;"&gt;&lt;b&gt;Wired up, all I got was flickering.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZC1tKLsdseeiaqxvtimJscDENrMiekOm273Tv7S-8LksSGccWTFpiBviPk-ZBG698R_tla8foJZTqCdU12oFoJK7v8wj_PurC3SWcZc8ebCZxp0YpcIefDhkykTYGlNDF7iWN43z4w0E/s1600/4digit7segment_2.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="480" data-original-width="640" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZC1tKLsdseeiaqxvtimJscDENrMiekOm273Tv7S-8LksSGccWTFpiBviPk-ZBG698R_tla8foJZTqCdU12oFoJK7v8wj_PurC3SWcZc8ebCZxp0YpcIefDhkykTYGlNDF7iWN43z4w0E/s400/4digit7segment_2.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
I was pretty sure it was wired as described, after several tries, so clearly my display had different pin inputs.&lt;br /&gt;
&lt;br /&gt;
I looked at the code, the first obvious thing to change was the common cathode / anode option.&lt;br /&gt;
In the code, I replaced the line&lt;br /&gt;
sevseg.Begin(1,2,3,4,5,6,7,8,9,10,11,12,13);&lt;br /&gt;
with&lt;br /&gt;
sevseg.Begin(0,2,3,4,5,6,7,8,9,10,11,12,13);&lt;br /&gt;
&lt;br /&gt;
And it worked perfectly. So my display has a common anode instead of cathode. No problem.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;"&gt;&lt;b&gt;Wired up the same, with the code changed to use a common anode - and it works beautifully.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3E0fwM1moCdQOGizfRPQNF1HzTGwuwBY0D8udw2MNtKyEqFbL9zlcpAR-vjIJP0DkY-xfTwURcffc6wcG71YR_eNwUokYMlDCMxhlfB-Z2oXvDgYwdndyLoQSssBI5lRNUWyxnJvXEus/s1600/4digit7segment_3.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="480" data-original-width="640" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3E0fwM1moCdQOGizfRPQNF1HzTGwuwBY0D8udw2MNtKyEqFbL9zlcpAR-vjIJP0DkY-xfTwURcffc6wcG71YR_eNwUokYMlDCMxhlfB-Z2oXvDgYwdndyLoQSssBI5lRNUWyxnJvXEus/s400/4digit7segment_3.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
The next obvious point is that this method uses way too many arduino pins to use in any standalone project, which might also include a number of other sensors or motors so that you run out of arduino pins to use. One solution would be to use a separate arduino to drive this display, and pass the data through the serial port.&lt;br /&gt;
A nice solution that I found is to use shift registers. I have been using these quite a lot recently on my robot car. A separate Arduino Pro Mini can be bought for around £4 on EBay UK.&lt;br /&gt;
For a look at using shift registers, see this chap's webpage.&lt;br /&gt;
&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('gizlenmis kod')"&gt;HIDDEN CODE&lt;/a&gt;&lt;br /&gt;
&lt;div class="commenthidden" id="gizlenmis kod"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;&lt;a href="https://lnkload.com/2vb8r" target="_blank"&gt;&lt;span style="color: red;"&gt;DOWLOAD&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0px;"&gt;https://kulogluelektronik.blogspot.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://kulogluelektronik.blogspot.com/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidSqJxFKe1Td-Jh3znupkS5OWwHALyI7_z06r49ecaTSm94-KovPC7jL1VXg7pUaFUsz1ofWlr0clri0XFDU-JynffkbqeN7UmDoJ23__TZldMPf34YLttFrllXAskWAgs4rVLo5WdxPw/s72-c/4digit7segment_1.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Ultrasonic distance sensor</title><link>https://kulogluelektronik.blogspot.com/2020/03/ultrasonic-distance-sensor.html</link><category>Arduino</category><category>sensor</category><pubDate>Fri, 13 Mar 2020 21:50:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-5890508866120113300</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
This was a great buy, easy to wire up and surprisingly accurate, when I measured up to 3 metres.&lt;br /&gt;
I found another blogger who had created the code.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;The ultrasonic distance sensor and pin layout.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQmPkIQMNP4lefqdr7niDIMw5V5wYGpb4_GI4H2L_jyVLZdaw2UfGCIZYoJv7mgjOGTplfBK25IVc3RGKLlV1bkePaXV8AX-_dTNqkVKHdXHhi8v2iykCI2RhIAoSMX5DoQWDxJFnTW-I/s1600/ultrasonic_1.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="482" data-original-width="640" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQmPkIQMNP4lefqdr7niDIMw5V5wYGpb4_GI4H2L_jyVLZdaw2UfGCIZYoJv7mgjOGTplfBK25IVc3RGKLlV1bkePaXV8AX-_dTNqkVKHdXHhi8v2iykCI2RhIAoSMX5DoQWDxJFnTW-I/s320/ultrasonic_1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span style="color: red;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="color: red;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span face="&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif" style="color: red;"&gt;Once I've built my robot, I intend to mount this on a motor, and work out the shape of the room using basic trig.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span face="&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span face="&amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif"&gt;Here is it wired up, and the code is below.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTVbUFXk722CBEH0uQ59NVD1eHJB2tZaPXErRoGx_7JqAAUH-4xIgRi8YxE5sV4GWicFQq70vKyi9EUDdcZ29898pTQPWv20ZjAsnMpJJoLii_fpd3g2N80vI8zphe6oaAfX8P8kcM130/s1600/ultrasonic_2.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="606" data-original-width="640" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTVbUFXk722CBEH0uQ59NVD1eHJB2tZaPXErRoGx_7JqAAUH-4xIgRi8YxE5sV4GWicFQq70vKyi9EUDdcZ29898pTQPWv20ZjAsnMpJJoLii_fpd3g2N80vI8zphe6oaAfX8P8kcM130/s320/ultrasonic_2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('gizlenmis kod')"&gt;HIDDEN CODE&lt;/a&gt;&lt;br /&gt;
&lt;div class="commenthidden" id="gizlenmis kod"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt; &lt;a href="https://lnkload.com/2vb8s" target="_blank"&gt;DOWLOAD&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0px;"&gt;https://kulogluelektronik.blogspot.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://kulogluelektronik.blogspot.com/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQmPkIQMNP4lefqdr7niDIMw5V5wYGpb4_GI4H2L_jyVLZdaw2UfGCIZYoJv7mgjOGTplfBK25IVc3RGKLlV1bkePaXV8AX-_dTNqkVKHdXHhi8v2iykCI2RhIAoSMX5DoQWDxJFnTW-I/s72-c/ultrasonic_1.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Arduino - PIR MOTION ALARM</title><link>https://kulogluelektronik.blogspot.com/2020/03/arduino-pir-motion-alarm.html</link><category>Arduino</category><category>sensor</category><pubDate>Fri, 13 Mar 2020 21:31:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-8714115650241358690</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hello world! Today i made a simple and very cheap to build alarm System with a keypad, pir sensor, relay and a very loud alarm strobe. You have 30 seconds time to leave the room after activating the alarm system, of course this can be changed in the code to less or more seconds. Now it has been set to 30000 milliseconds.&lt;br /&gt;
You can change it at this line in the code:&lt;br /&gt;
const int timeDelay = 30000; //give yourself time to leave the room&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Follow the next step for the Schematic, Code &amp;amp; Parts list.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgKetP5rmGns8A5Uhc8e2cpLfhn8vAb6UbEa66ajrKNplLYr5HDAlIAK-my3mb0i3czuJwjetZ1KnT1rSnl76zUgWYcJ9kJ_ef6z_UUF1nk943154D88paHEhUYl45yI3OadQDaQER740/s1600/FTIHXZ3IT22USGN.LARGE.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="504" data-original-width="1024" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgKetP5rmGns8A5Uhc8e2cpLfhn8vAb6UbEa66ajrKNplLYr5HDAlIAK-my3mb0i3czuJwjetZ1KnT1rSnl76zUgWYcJ9kJ_ef6z_UUF1nk943154D88paHEhUYl45yI3OadQDaQER740/s320/FTIHXZ3IT22USGN.LARGE.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both;"&gt;
Simply wire it up like the schematic, Upload the code and it should work.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Make sure you have these libraries installed, download them below.&lt;/div&gt;
&lt;ul style="background-color: white; color: #555555; font-family: myriad-pro, helvetica, arial, sans-serif; font-size: 20px; list-style-image: initial; list-style-position: initial; margin: 0px; max-width: 100%; overflow: auto; padding: 0px 0px 20px 20px;"&gt;
&lt;li style="line-height: 36px; max-width: 100%; overflow: initial;"&gt;&lt;a href="http://playground.arduino.cc/Code/Password" rel="nofollow" style="color: #1e8439; cursor: pointer; max-width: 100%; overflow-wrap: break-word; overflow: auto; word-break: break-word;"&gt;Password.h&lt;/a&gt;&lt;/li&gt;
&lt;li style="line-height: 36px; max-width: 100%; overflow: initial;"&gt;&lt;a href="http://playground.arduino.cc/Code/Keypad" rel="nofollow" style="color: #155a27; cursor: pointer; max-width: 100%; outline-offset: -2px; outline: 0px; overflow-wrap: break-word; overflow: auto; word-break: break-word;"&gt;Keypad.h&lt;/a&gt;&lt;/li&gt;
&lt;li style="line-height: 36px; max-width: 100%; overflow: initial;"&gt;&lt;a href="http://playground.arduino.cc/Main/LiquidCrystal" rel="nofollow" style="color: #1e8439; cursor: pointer; max-width: 100%; overflow-wrap: break-word; overflow: auto; word-break: break-word;"&gt;LiquidCrystal.h&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Parts list:&lt;br /&gt;
&lt;br /&gt;
Arduino uno, I used the&lt;a href="http://arduinosensors.nl/index.php?route=product/product&amp;amp;path=25_29&amp;amp;product_id=92" target="_blank"&gt; RobotDyn uno&lt;/a&gt;. Which has 2 extra analog pins&lt;br /&gt;
Potentiometer&lt;br /&gt;
LCD 1602&lt;br /&gt;
Pir motion sensor DSN FIR800&lt;br /&gt;
&lt;a href="http://arduinosensors.nl/index.php?route=product/product&amp;amp;product_id=86" target="_blank"&gt;Ky-019&lt;/a&gt; Relay module&lt;br /&gt;
1 x Blue Led&lt;br /&gt;
1 x Red led&lt;br /&gt;
2 x 1 k Resistor.&lt;br /&gt;
4x4 Keypad&lt;br /&gt;
12v Alarm Strobe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('gizlenmis kod')"&gt;gizlenmis kod&lt;/a&gt;&lt;br /&gt;
&lt;div class="commenthidden" id="gizlenmis kod"&gt;
&lt;br /&gt;
#include &lt;liquidcrystal .h=""&gt; //http://playground.arduino.cc/Main/LiquidCrystal&lt;/liquidcrystal&gt;&lt;br /&gt;
#include &lt;keypad .h=""&gt; //http://playground.arduino.cc/Code/Keypad&lt;/keypad&gt;&lt;br /&gt;
#include &lt;password .h=""&gt; //http://playground.arduino.cc/Code/Password&lt;/password&gt;&lt;br /&gt;
&lt;br /&gt;
int passwd_pos = 7;&lt;br /&gt;
Password password = Password("1589");&lt;br /&gt;
&lt;br /&gt;
LiquidCrystal lcd(5, 4, 3, 2, 1, 0);&lt;br /&gt;
&lt;br /&gt;
const byte ROWS = 4;&lt;br /&gt;
const byte COLS = 4;&lt;br /&gt;
char keys[ROWS][COLS] = {&lt;br /&gt;
&amp;nbsp; {'1','2','3','A'},&lt;br /&gt;
&amp;nbsp; {'4','5','6','B'},&lt;br /&gt;
&amp;nbsp; {'7','8','9','C'},&lt;br /&gt;
&amp;nbsp; {'*','0','#','D'}&lt;br /&gt;
};&lt;br /&gt;
byte rowPins[ROWS] = {13, 12, 11, 10};&lt;br /&gt;
byte colPins[COLS] = {9, 8, 7, 6};&lt;br /&gt;
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );&lt;br /&gt;
&lt;br /&gt;
const int pirPin = A0;&lt;br /&gt;
const int Relay = A1;&lt;br /&gt;
const int redPin = A2;&lt;br /&gt;
const int bluePin = A3;&lt;br /&gt;
const int ledError = 50;&lt;br /&gt;
const int timeDelay = 30000; //give yourself time to leave the room&lt;br /&gt;
int alarmStatus = 0;&lt;br /&gt;
int alarmActive = 0;&lt;br /&gt;
&lt;br /&gt;
void setup(){&lt;br /&gt;
&amp;nbsp; lcd.begin(16,2);&lt;br /&gt;
&amp;nbsp; pinMode(Relay, OUTPUT);&lt;br /&gt;
&amp;nbsp; pinMode(pirPin, INPUT);&lt;br /&gt;
&amp;nbsp; pinMode(redPin, OUTPUT);&lt;br /&gt;
&amp;nbsp; pinMode(bluePin, OUTPUT);&lt;br /&gt;
&amp;nbsp; keypad.addEventListener(keypadEvent);&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; lcd.print("Motion Alarm");&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,1);&lt;br /&gt;
&amp;nbsp; lcd.print("BlueCore Tech");&lt;br /&gt;
&amp;nbsp; delay(1600);&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; lcd.print("Created by");&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,1);&lt;br /&gt;
&amp;nbsp; lcd.print("D.Van Den Brande");&lt;br /&gt;
&amp;nbsp; delay(2000);&lt;br /&gt;
&amp;nbsp; digitalWrite(bluePin, HIGH);&lt;br /&gt;
&amp;nbsp; displayCodeBlock();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop(){&lt;br /&gt;
&amp;nbsp; keypad.getKey();&lt;br /&gt;
&amp;nbsp; if (alarmActive == 1){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (digitalRead(pirPin) == HIGH){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; alarmTriggered();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void keypadEvent(KeypadEvent eKey){&lt;br /&gt;
&amp;nbsp; switch (keypad.getState()){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; case PRESSED:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (passwd_pos - 15 &amp;gt;= 5){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.setCursor((passwd_pos++),0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; switch (eKey){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; case '#':&lt;br /&gt;
&amp;nbsp; &amp;nbsp; passwd_pos&amp;nbsp; = 7;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; checkPassword();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; case '*':&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; password.reset();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; passwd_pos = 7;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; default:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; password.append(eKey);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.print("*");&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void alarmTriggered(){&lt;br /&gt;
&amp;nbsp; password.reset();&lt;br /&gt;
&amp;nbsp; alarmStatus = 0;&lt;br /&gt;
&amp;nbsp; digitalWrite(Relay, HIGH);&lt;br /&gt;
&amp;nbsp; digitalWrite(redPin, HIGH);&lt;br /&gt;
&amp;nbsp; digitalWrite(bluePin, LOW);&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; displayCodeUnBlock(); //modified&lt;br /&gt;
&amp;nbsp; &amp;nbsp; StrokeLight();{&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
void StrokeLight(){&lt;br /&gt;
&amp;nbsp; for (int i=0; i&amp;lt;=10; i++){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(i%2){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(redPin, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(redPin, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; delay(ledError);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; for (int i=0; i&amp;lt;=10; i++){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(i%2){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(bluePin, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(bluePin, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; delay(ledError);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; digitalWrite(redPin, HIGH);&lt;br /&gt;
&amp;nbsp; delay(100);&lt;br /&gt;
&lt;br /&gt;
}&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
void checkPassword(){&lt;br /&gt;
&amp;nbsp; if (password.evaluate()){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(alarmActive == 0 &amp;amp;&amp;amp; alarmStatus == 0){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; activate();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else if( alarmActive == 1 || alarmStatus == 1){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; deactivate();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; else{&lt;br /&gt;
&amp;nbsp; invalidCode();&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void invalidCode(){&lt;br /&gt;
&amp;nbsp; digitalWrite(bluePin, LOW);&lt;br /&gt;
&amp;nbsp; password.reset();&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; lcd.print("Toegang geweigerd");&lt;br /&gt;
&amp;nbsp; ledInvalid();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void ledInvalid(){&lt;br /&gt;
&amp;nbsp; for (int i=0; i&amp;lt;=10; i++){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(i%2){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(redPin, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(redPin, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; delay(ledError);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; if(alarmActive == 0 &amp;amp;&amp;amp; alarmStatus == 0){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(Relay, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(bluePin, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(redPin, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; delay(200);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; displayCodeBlock();&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; else if( alarmActive == 1 || alarmStatus == 1){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(Relay, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(redPin, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; digitalWrite(bluePin, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; delay(200);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void activate(){&lt;br /&gt;
&amp;nbsp; alarmActive = 1;&lt;br /&gt;
&amp;nbsp; password.reset();&lt;br /&gt;
&amp;nbsp; digitalWrite(bluePin, LOW);&lt;br /&gt;
&amp;nbsp; digitalWrite(redPin, HIGH);&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; lcd.print("Systeem actief");&lt;br /&gt;
&amp;nbsp; delay(timeDelay);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void deactivate(){&lt;br /&gt;
&amp;nbsp; alarmStatus = 0;&lt;br /&gt;
&amp;nbsp; alarmActive = 0;&lt;br /&gt;
&amp;nbsp; password.reset();&lt;br /&gt;
&amp;nbsp; digitalWrite(Relay, LOW);&lt;br /&gt;
&amp;nbsp; digitalWrite(bluePin, HIGH);&lt;br /&gt;
&amp;nbsp; digitalWrite(redPin, LOW);&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; lcd.print("Gedeactiveerd");&lt;br /&gt;
&amp;nbsp; delay(1000);&lt;br /&gt;
&amp;nbsp; displayCodeBlock();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void displayCodeUnBlock(){&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; lcd.print("Code:");&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,1);&lt;br /&gt;
&amp;nbsp; lcd.print("Deactiveren");&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void displayCodeBlock(){&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; lcd.print("Code:");&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,1);&lt;br /&gt;
&amp;nbsp; lcd.print("Activeren");&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;https://kulogluelektronik.blogspot.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="https://cdn.instructables.com/ORIG/FHC/G7TI/IT22USH3/FHCG7TIIT22USH3.ino/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;

&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgKetP5rmGns8A5Uhc8e2cpLfhn8vAb6UbEa66ajrKNplLYr5HDAlIAK-my3mb0i3czuJwjetZ1KnT1rSnl76zUgWYcJ9kJ_ef6z_UUF1nk943154D88paHEhUYl45yI3OadQDaQER740/s72-c/FTIHXZ3IT22USGN.LARGE.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>MP3 Player Yapımı</title><link>https://kulogluelektronik.blogspot.com/2020/03/mp3-player-yapm.html</link><category>Devre</category><pubDate>Wed, 11 Mar 2020 12:31:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-8235057182297709010</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaX9tscfPEvBc6w4TbC6KAL_iqDnzsnYXYZG1Az-vYBk3sRuJ1THus4kuMWX4Gan0UkGLNbai0NvggIlPhC9kJ_m8JatbgJbqlCcE8j0-NaO13YRq-bFa7U6fxavY_WqNwxBdK5banAzA/s1600/mp3player_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" data-original-height="480" data-original-width="640" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaX9tscfPEvBc6w4TbC6KAL_iqDnzsnYXYZG1Az-vYBk3sRuJ1THus4kuMWX4Gan0UkGLNbai0NvggIlPhC9kJ_m8JatbgJbqlCcE8j0-NaO13YRq-bFa7U6fxavY_WqNwxBdK5banAzA/s320/mp3player_1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
I got thoroughly fed up with cheap MP3 players 2 years ago, and built my own. It works so well for me. Project completed; December 2014. Updated January 2016&lt;br /&gt;
&lt;br /&gt;
This project was great; there are a number of issues that you will also face, if you choose to investigate this more.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;b style="color: red; font-family: &amp;quot;courier new&amp;quot;, courier, monospace; font-size: x-large;"&gt;MP3 player components :&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: large;"&gt;&lt;b&gt;- 5 switches&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: large;"&gt;&lt;b&gt;- Arduino Uno&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: large;"&gt;&lt;b&gt;- 16x2 LCD screen&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: large;"&gt;&lt;b&gt;- SD card reader&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: large;"&gt;&lt;b&gt;- MP3 codec decoder&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: xx-small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
- The arduino has 2K of RAM, and the libraries use a significant amount of this. The code stores file names in RAM; this is limited. Currently, there's a max of 20 files per directory.&lt;br /&gt;
- Storing the filenames in RAM allows a sort function to display the mp3 files in sequence. This is essential for me, since I have audio books with chapters that obviously have to be played in sequence.&lt;br /&gt;
- The arduino SD library, which reads the SD card, uses 8.3 filename format. I looked at ways to support long filenames, and drew a blank once I understood more about it. Help yourself to solving this issue.&lt;br /&gt;
- The MP3 codec board has a very important bug in it. It boots into MIDI mode. More on this issue later; it's a biggie.&lt;br /&gt;
- The code used on the arduino Uno (development) worked differently on the Arduino Pro Mini. The code was written to deal with this; sending an MP3 file to the codec board several times forced the board to reset into mp3 mode on the Uno, not on the Pro Mini.&lt;br /&gt;
Here is what I built, and it works so beautifully for what I need.&lt;br /&gt;
I often update the code for this thing; if you would like the latest code version, then please just send me an email and ask for it.&lt;br /&gt;
try version 1.36&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('gizlenmis kod')"&gt;&lt;/a&gt;&lt;br /&gt;
gizlenmis kod&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="commenthidden" id="gizlenmis kod"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;pre style="overflow-wrap: break-word; white-space: pre-wrap;"&gt;//delayMicroseconds(10);// MP3 player ...&lt;/pre&gt;
&lt;br /&gt;
// Author&amp;nbsp; : Paul Goodliffe&lt;br /&gt;
// Date&amp;nbsp; &amp;nbsp; : Oct 2014&lt;br /&gt;
//&lt;br /&gt;
// Changes : 1.19 - added size of file (in blocks of 32)&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Using blocksInFile, prevent fast forward past end of file&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - fixed bug in fast rewind (incorrect # of blocks subtracted to actual position)&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.20 - Only include directories and file suffix *.mp3; ignore others.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.21 - Use button 5 to restore saved file/position&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.22 - Switch off after n hours&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.23 - Record voltage every minute to a file, to observe voltage falling.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.24 - Memory saving: backup.dat and voltage.dat renamed to b.dat and v.dat&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - voltageStr and blocksPlayedStr replaced with one string, tempStr&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.25 - Recover from rebuild disaster : random stopping.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Remove SD_POWER&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Included printFreeMemory(); on setup and before play.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Removed checkMemory()&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - removed code to shut the arduino off; it wasn't saving power anyway&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - If its time for sleep, then stop playing the current track.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.26 - Display voltage on screen during play !!&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - lastVoltageCheck renamed nextVoltageCheck.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Display bytes free on screen as well !&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - If SD card error, display error and delay a while ... (was 'return'ing).&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - MAXINARRAY works at 15, but not at 20. - changed&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.27 - pull MP3_HARDRESET low again in setup. // NO REAL CHANGE&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.28 - Display error msg if unable to backup&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - No longer write voltage to voltage file. Keep printing it to the screen for the time being, until we&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; &amp;nbsp; complete the investigation into it's usefulness.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - replace lastBackupBlocks with nextBackupBocks; avoid adding 5000 every cycle.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Change switch off time from 60 to 90 mins.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.29 - ABANDONED - never released&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.30 - ACTION_STOP_PLAYING, not ACTION_END_MP3. BUG. At the end of switch-off-time, the wrong status was&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; being set.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - In the menu (eg change volume), after 10 seconds of inactivity, return to browsing/playing menu.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.31 - Abandon the voltage check, because it doesn't provide a reliable amount of battery life remaining.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Instead, start counting the minutes used both in playmode and in browse mode.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.32 - Removed 90 minute time limit, found mAh during play is 85, mAh during pause is 65.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.33 - took v1.31, put back in the ShutDown routine after 90 minutes.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.34 - reset button goes to 1 instead of 0&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - button 5 prints a first message "button pressed" before waiting for button 1 to chhose between restoring&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and resetting battery&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Instead of displaying minutes paused and played, display mAh used.&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.36 - b.dat was being written too often, and it destroyed the SD card first block. SD card reformatted to ignore first 8Mb;&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; but program must be changed to reduce number of times b.dat is writtem to disk.&lt;br /&gt;
//&lt;br /&gt;
// TODO&lt;br /&gt;
// display how many minutes of playtime is remaining ?&lt;br /&gt;
// NO IDEA ! Why does decode_time contain random&amp;nbsp; ??&lt;br /&gt;
// After 5 secs of inactivity on volume, return to play.&lt;br /&gt;
//&lt;br /&gt;
#include &lt;wire .h=""&gt;&lt;/wire&gt;&lt;br /&gt;
#include &lt;liquidcrystal_i2c .h=""&gt;&lt;/liquidcrystal_i2c&gt;&lt;br /&gt;
#include &lt;sd .h=""&gt;&lt;/sd&gt;&lt;br /&gt;
#include &lt;spi .h=""&gt;&lt;/spi&gt;&lt;br /&gt;
#include &lt;eeprom .h=""&gt;&lt;/eeprom&gt;&lt;br /&gt;
//#include &lt;avr pgmspace.h=""&gt;&lt;/avr&gt;&lt;br /&gt;
#include &lt;avr sleep.h=""&gt;&lt;/avr&gt;&lt;br /&gt;
&lt;br /&gt;
// Framework headers&lt;br /&gt;
// Library headers&lt;br /&gt;
#include &lt;vs1053 .h=""&gt;&lt;/vs1053&gt;&lt;br /&gt;
//#include &lt;adafruit_vs1053 .h=""&gt;&lt;/adafruit_vs1053&gt;&lt;br /&gt;
//#include &lt;memoryfree .h=""&gt;&lt;/memoryfree&gt;&lt;br /&gt;
byte DIR =1;&amp;nbsp; &amp;nbsp; // Is the file a directory, or a playable file ?&lt;br /&gt;
byte PLAY =2;&amp;nbsp; &amp;nbsp; // Is the file a directory, or a playable file ?&lt;br /&gt;
&lt;br /&gt;
char currentOpenDirectory[40] = "/";&amp;nbsp; &amp;nbsp;// 40 is enough for 2 directories, a file, and the slashes&lt;br /&gt;
char thisFile[40];&lt;br /&gt;
File playFile;&lt;br /&gt;
File backupFile;&lt;br /&gt;
char backupFileName[] = "/b.dat";&lt;br /&gt;
byte doNotBackup = 0;&lt;br /&gt;
&lt;br /&gt;
#define PLAY_MSB 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // The 2 integers (4 bytes) for how much time has been spent in&lt;br /&gt;
#define PLAY_LSB 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // play mode or pause mode are stored in EEPROM&lt;br /&gt;
#define PAUSE_MSB 3&lt;br /&gt;
#define PAUSE_LSB 4&lt;br /&gt;
uint16_t minutesPlaying;&lt;br /&gt;
uint16_t minutesPaused;&lt;br /&gt;
&lt;br /&gt;
LiquidCrystal_I2C lcd(0x27,16,2);&amp;nbsp; // set the LCD address to 0x27 for a 16 chars and 2 line display&lt;br /&gt;
#define lcdDimmed 0&lt;br /&gt;
#define lcdLit 1&lt;br /&gt;
byte lcdStatus;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
VS1053 player(/* cs_pin */ 9,/* dcs_pin */ 8,/* dreq_pin */ 3,/* reset_pin */ 7);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
byte fileNumber = 1;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // This is between 1 and 50, reflectinq_pin */ g which message number is printed on the LCD&lt;br /&gt;
byte tempValue, i;&lt;br /&gt;
uint16_t tempValue16;&lt;br /&gt;
byte msgUpPin = A1;&amp;nbsp; &amp;nbsp; // The switch to scroll messages UP - switch up/down as you want !&lt;br /&gt;
byte msgDownPin = A0;&amp;nbsp; // The switch to scroll messages DOWN&lt;br /&gt;
byte msgSelectPin = A2; // Pin number for SELECT switch&lt;br /&gt;
byte msgMenuPin = A3;&amp;nbsp; &amp;nbsp; // Pin number for MENU switch&lt;br /&gt;
byte msgFifthPin = 6;&amp;nbsp; &amp;nbsp; // Pin number for 5th switch. Usage ?&lt;br /&gt;
unsigned long lastButtonPress; // Used to prevent repeat button presses, and also to dim the display&lt;br /&gt;
&lt;br /&gt;
unsigned long lastDecodeTime; // Used to show decode time every n seconds&lt;br /&gt;
unsigned long switchOffTime;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Used to determine when to shut the mp3 player off; eg 2 hours later&lt;br /&gt;
unsigned long currentTime;&amp;nbsp; &amp;nbsp; // Used to get millis() once per loop instead of 5+ times in each function.&lt;br /&gt;
unsigned long addMinuteCounter; // Used to add a minute of usage to the appropriate counters.&lt;br /&gt;
&lt;br /&gt;
// ----------------------------------------------------------&lt;br /&gt;
// Menu list items: ensure MENU_END is the highest number !!&lt;br /&gt;
// ----------------------------------------------------------&lt;br /&gt;
#define MENU_NOTSET 0&lt;br /&gt;
#define MENU_VOL 1&lt;br /&gt;
#define MENU_END 2&lt;br /&gt;
byte wantedMenuStatus = MENU_NOTSET;&lt;br /&gt;
byte currentMenuStatus = MENU_NOTSET;&lt;br /&gt;
//&lt;br /&gt;
byte numFilesInArray = 0; // This is the number of files; max 10 per directory.&lt;br /&gt;
#define MAXINARRAY 15&lt;br /&gt;
char *fileName[MAXINARRAY];&amp;nbsp; // Number of files per directory. Pointers to mallocs.&lt;br /&gt;
byte fileType[MAXINARRAY];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // #define STOP 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; byte actionStatus;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define ACTION_BROWSING_MP3 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define ACTION_SELECT_MP3 3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define ACTION_PLAYING_MP3 4&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define ACTION_PAUSED_MP3 5&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define ACTION_STOP_PLAYING 6&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define ACTION_RESTORE 7&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define ACTION_END_MP3 8&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //#define SELECT_DONE 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //#define SELECT_PLAY 1&lt;br /&gt;
&lt;br /&gt;
byte wantedDisplayStatus;&lt;br /&gt;
byte currentDisplayStatus;&lt;br /&gt;
#define DISPLAY_WELCOME 1&lt;br /&gt;
#define DISPLAY_BROWSING 2&lt;br /&gt;
#define DISPLAY_PLAYING 3&lt;br /&gt;
#define DISPLAY_PAUSED 4&lt;br /&gt;
#define DISPLAY_MENU 5&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; byte myStatus;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; byte noOfBytesRead;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; uint8_t dataBuffer[32];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //unsigned long filePos = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //unsigned long fileSize = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; char serialIn ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; byte thisVolume = 100;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; unsigned long resetMillis;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; byte actuallyPlaying;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; byte failureToPlay = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; unsigned long blocksPlayed;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // unsigned long nextBackupBlocks;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; unsigned long blocksInFile;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; char tempStr[10];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; byte actionRestore = 0;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Control Chip Select Pin (for accessing SPI Control/Status registers) */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define MP3_XCS 9&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Data Chip Select / BSYNC Pin */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define MP3_XDCS 8&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SD_CS 5&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //** Data Request Pin: Player asks for more data */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define MP3_DREQ 3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define MP3_HARDRESET 7&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** VS10xx SCI Registers */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_MODE 0x0&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_STATUS 0x1&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_BASS 0x2&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_CLOCKF 0x3&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_DECODE_TIME 0x4&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_AUDATA 0x5&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_WRAM 0x6&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_WRAMADDR 0x7&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_HDAT0 0x8&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_HDAT1 0x9&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_AIADDR 0xa&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_VOL 0xb&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_AICTRL0 0xc&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register Song number to play at power up*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_AICTRL1 0xd&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_AICTRL2 0xe&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register USED FOR LOUDNESS*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #define SPI_AICTRL3 0xf&amp;nbsp; &amp;nbsp;/**&amp;lt; VS10xx register Play mode and misc config*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // SCI_MODE bits&amp;nbsp; &lt;br /&gt;
const uint8_t SM_LAYER12 = 1;&lt;br /&gt;
const uint8_t SM_RESET = 2;&lt;br /&gt;
const uint8_t SM_STREAM = 6;&lt;br /&gt;
const uint8_t SM_SDINEW = 11;&lt;br /&gt;
&lt;br /&gt;
// For space reasons, we only define those mode bits that are actually used - the rest are&lt;br /&gt;
// commented out.&lt;br /&gt;
// const uint8_t SM_DIFF = 0;&lt;br /&gt;
// const uint8_t SM_OUTOFWAV = 3;&lt;br /&gt;
// const uint8_t SM_EARSPEAKER_LO = 4;&lt;br /&gt;
// const uint8_t SM_TESTS = 5;&lt;br /&gt;
// const uint8_t SM_EARSPEAKER_HI = 7;&lt;br /&gt;
// const uint8_t SM_DACT = 8;&lt;br /&gt;
// const uint8_t SM_SDIORD = 9;&lt;br /&gt;
// const uint8_t SM_SDISHARE = 10;&lt;br /&gt;
// const uint8_t SM_ADPCM = 12;&lt;br /&gt;
// const uint8_t SM_ADCPM_HP = 13;&lt;br /&gt;
// const uint8_t SM_LINE_IN = 14;&lt;br /&gt;
// const uint8_t SM_CLK_RANGE = 15;&lt;br /&gt;
&lt;br /&gt;
// ---------------------------------------&lt;br /&gt;
// Define our printable strings in PROGMEM&lt;br /&gt;
// ---------------------------------------&lt;br /&gt;
const prog_uchar welcomeLine1[] PROGMEM = "MP3 player V1.36";&amp;nbsp; &lt;br /&gt;
const prog_uchar welcomeLine2[] PROGMEM = " ";&lt;br /&gt;
const prog_uchar playingFile[] PROGMEM = "@";&lt;br /&gt;
const prog_uchar volume[] PROGMEM = "Volume : ";&lt;br /&gt;
const prog_uchar paused[] PROGMEM = "Paused ...";&lt;br /&gt;
const prog_uchar cardError[] PROGMEM = "SD Card ERROR.";&lt;br /&gt;
const prog_uchar restoring[] PROGMEM = "Restoring file";&lt;br /&gt;
const prog_uchar backupError[] PROGMEM = "Backup ERROR.";&lt;br /&gt;
const prog_uchar resetUsage[] PROGMEM = "Reset Battery.";&lt;br /&gt;
const prog_uchar sleeping[] PROGMEM = "Good night...";&lt;br /&gt;
const prog_uchar fifthButton[] PROGMEM = "Menu pressed ...";&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//const prog_uchar lowMemory[] PROGMEM = "LOW MEMORY !!!";&lt;br /&gt;
//const prog_uchar freeMemoryStr[] PROGMEM = "Memory : ";&lt;br /&gt;
&lt;br /&gt;
char myChar;&amp;nbsp; &amp;nbsp; // Used throughout, to read a char/string from PROGMEM.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Pull the VS10xx Control Chip Select line Low */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void Mp3SelectControl()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(MP3_XCS, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Pull the VS10xx Control Chip Select line High */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void Mp3DeselectControl()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(MP3_XCS, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Pull the VS10xx Data Chip Select line Low */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void Mp3SelectData()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(MP3_XDCS, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /** Pull the VS10xx Data Chip Select line High */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void Mp3DeselectData()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(MP3_XDCS, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void SelectSD()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(SD_CS, LOW);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void DeselectSD()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(SD_CS, HIGH);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
void WriteRegister(uint8_t _reg, uint16_t _value)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;// SPI.setClockDivider(SPI_CLOCK_DIV64); // PAUL !! TEST&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // DREQ MUST BE HIGH BEFORE YOU START !!!&lt;br /&gt;
&amp;nbsp; while ( digitalRead(MP3_DREQ) == LOW )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delayMicroseconds(1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; DeselectSD();&lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; Mp3SelectControl();&lt;br /&gt;
&amp;nbsp; delayMicroseconds(1); // tXCSS&lt;br /&gt;
&amp;nbsp; SPI.transfer(B10); // Write operation&lt;br /&gt;
&amp;nbsp; SPI.transfer(_reg); // Which register&lt;br /&gt;
&amp;nbsp; SPI.transfer(_value &amp;gt;&amp;gt; 8); // Send hi byte&lt;br /&gt;
&amp;nbsp; SPI.transfer(_value &amp;amp; 0xff); // Send lo byte&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DEselect sets XDCS HIGH, thus ending the current operation.&lt;br /&gt;
&amp;nbsp; delayMicroseconds(1); // tXCSH&lt;br /&gt;
&amp;nbsp; awaitDataRequest();&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; SPI.setClockDivider(SPI_CLOCK_DIV2); // PAUL !! TEST&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void awaitDataRequest(void)&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while ( !digitalRead(MP3_DREQ) );&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
// ----------------------------------------------------------------------------------------------&lt;br /&gt;
// SOFT RESET&lt;br /&gt;
// Soft Reset of VS10xx (Between songs)&lt;br /&gt;
/*&lt;br /&gt;
In some cases the decoder software has to be reset. This is done by activating bit SM_RESET&lt;br /&gt;
in register SCI_MODE). Then wait for at least 2 micro-s, then look at DREQ.&lt;br /&gt;
DREQ will stay down for about 22000 clock cycles, which means an approximate 1.8 ms&lt;br /&gt;
delay if&lt;br /&gt;
VS1053b is run at 12.288 MHz. After DREQ is up, you may continue playback as usual&lt;br /&gt;
&lt;br /&gt;
ALSO : If the user wants to powerdown VS1053b with a minimum power-off transient, set SCI_VOL to&lt;br /&gt;
0xffff, then wait for at least a few milliseconds before activating reset.*/&lt;br /&gt;
// ----------------------------------------------------------------------------------------------&lt;br /&gt;
void Mp3SoftReset()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Serial.println("Soft Reset:");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // SPI.setDataMode(SPI_MODE0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // SPI.setBitOrder(MSBFIRST);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// PAUL !!! These are the 2 lines that make it work/not work each time you do a soft reset !!!&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SPI.setClockDivider(SPI_CLOCK_DIV64);//slow SPI bus speed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SPI.transfer(0xFF);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DeselectSD();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mp3SelectControl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;awaitDataRequest();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WriteRegister(SPI_MODE, (uint16_t)(_BV(SM_RESET) | _BV(SM_SDINEW) | _BV(SM_LAYER12)) | _BV(SM_STREAM) );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Set clock register, doubler etc. */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* CHANGE 1 */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;awaitDataRequest();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WriteRegister(SPI_CLOCKF, (uint16_t)0x8800);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;//&amp;nbsp; &amp;nbsp;Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; SPI.setClockDivider(SPI_CLOCK_DIV2); //basically just set fast SPI bus speed //SPI_CLOCK_DIV2&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Mp3WriteRegister(SPI_CLOCKF, 0xb3, 0xfe);&amp;nbsp; //VS1003&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Mp3WriteRegister(SPI_CLOCKF, 0x88, 0x00);&amp;nbsp; //VS1058&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//PAUL !! 3 lines&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//DeselectSD();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Mp3SelectData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WriteRegister(SPI_MODE, (uint16_t)0x0804);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//WriteRegister(SPI_MODE, (uint16_t)(_BV(SM_RESET) | _BV(SM_SDINEW) | _BV(SM_LAYER12)) | _BV(SM_STREAM) );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delay(1); /* One millisecond delay */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; awaitDataRequest();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; /***********************************ADDED AS TESTS*/&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; &amp;nbsp; DeselectSD();&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; &amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; &amp;nbsp; Mp3DeselectData();&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; player.setVolume(0xff);&lt;br /&gt;
&amp;nbsp;//&amp;nbsp; &amp;nbsp; &amp;nbsp;WriteRegister(SPI_VOL, (uint16_t)0xffff);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Mp3SetVolume(0xff,0xff); //Declick: Immediately switch analog off&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Declick: Slow sample rate for slow analog part startup */&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WriteRegister(SPI_AUDATA, (uint16_t)0x1000);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Mp3WriteRegister(SPI_AUDATA, 0, 10); /* 10 Hz */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delay(100);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; /* Switch on the analog parts */&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; player.setVolume(0xfe);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; WriteRegister(SPI_VOL, (uint16_t)0xfefe);&lt;br /&gt;
&amp;nbsp;//&amp;nbsp; &amp;nbsp; &amp;nbsp;WriteRegister(SPI_BASS, (uint16_t)0xfefe);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Mp3SetVolume(0xfe,0xfe);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// WriteRegister(SPI_AUDATA, 0xAC45); // This is the value used for MIDI mode...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delay(2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; WriteRegister(SPI_AUDATA, (uint16_t)44101);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delay(2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; WriteRegister(SPI_DECODE_TIME, (uint16_t)0x00);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delay(2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WriteRegister(SPI_AUDATA, 0x9C60);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delay(2);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; player.setVolume(thisVolume); //&amp;nbsp; This should set the volume to prev value; check thisVolume.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //WriteRegister(SPI_VOL, (uint16_t)thisVolume); // WRONG VAUE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delay(2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SPI.setClockDivider(SPI_CLOCK_DIV2);//slow SPI bus speed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SPI.transfer(0xFF);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------------&lt;br /&gt;
// TRANSFER DATA TO MP3 PLAYER&lt;br /&gt;
// Correct pin selection should be done in this routine. NB deselect the data line&lt;br /&gt;
// when finished.&lt;br /&gt;
// ------------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void TransferMP3Data(byte NumOfBytesToSend)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DeselectSD();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mp3SelectData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;awaitDataRequest();&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (tempValue=0; tempValue &amp;lt; NumOfBytesToSend; tempValue++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPI.transfer(dataBuffer[tempValue]); //Send out 32 bytes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blocksPlayed++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// The decodetime register must be read WHILE data is being correctly decoded.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;displayDecodeTime();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------------&lt;br /&gt;
// TRANSFER END OF FILE TO MP3 PLAYER&lt;br /&gt;
// Correct pin selection should be done in this routine&lt;br /&gt;
// ------------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void TransferEndOfFile()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// End of file - send 2048 zeros before next file&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DeselectSD();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mp3SelectData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (int i=0; i&lt;2048 ------------------------------------------------------------------------------="" -----------------------------------------------------------------="" -="" ...="" 0="" 0x04="" 0x0804="" 0x08="" 0x9c60="" 1.30="" 1.8="" 1000ms="" 10="" 12.288="" 1="" 22000="" 31="" 32="" 44.1khz="" 5000l="" 5="" 60="" 60l="" 64="" 8khz="" :="" _bv="" a="" abandoned="" action_browsing_mp3="" action_select_mp3="" action_stop_playing="" actionrestore="0;" actionstatus="ACTION_BROWSING_MP3;" actually="" actuallyplaying="0;" add="" addminute="" addminutecounter="currentTime" after="" an="" analog="" and="" another="" any="" appropriate="" approximate="" are="" around="" as="" at="" awaitdatarequest="" back="" backup="" basic="" battery="" be="" because="" been="" before="" begin="" being="" blocksinfile="playFile.size()" blocksplayed="0;" boot="" browse="" browsing="" buffer="" bus="" button="" byte="" calling="" can="" card="" casts="" changes="" check="" checkforsleep="" checkvoltage="" chip="" class="" clear="" clock="" close="" completed="" copy.="" correct="" count="" counters="" current="" currentdisplaystatus="0;" currentopendirectory="" currenttime="millis();" cycles="" data.="" data="" declick:="" decoding.="" default="" delay="" delaymicroseconds="" dereferencing="" deselectsd="" did="" digitalread="" digitalwrite="" dim="" dimdisplay="" display.="" display="" do="" don="" down="" dreq="" dummy="" e="" eeprom="" elay="" else="" end="" erial.begin="" erial.println="" error="" even="" every="" experimenting="" failed="" fails="" failuretoplay="" fast="" file.="" file="" filename="" filenumber-1="" filepos.="" for="" from="" function="" functions="" get="" getstarttimes="" go="" hard="" hardware="" have="" here:="" high="" higher="" hour="" hours="" how="" hrow="" hz="" i="" if="" in="" inactivity="" init="" initialize="" input="" int="" introduce="" is="" it="" just="" keep="" know="" l1-2="" l="" last="" lastbuttonpress="currentTime;" lastdecodetime="currentTime;" lcd.backlight="" lcd.clear="" lcd.init="" lcd.print="" lcd.setcursor="" lcd="" lcdstatus="lcdLit;" library="" life="" long="" loop.="" loop="" lot="" low="" many="" means="" messages="" mhz.="" midi="" millis="" mins="1" minute.="" minute="" minutes.="" mode="" monitor="" mp3...="" mp3="" mp3deselectcontrol="" mp3deselectdata="" mp3selectcontrol="" mp3selectdata="" mp3writeregister="" ms="" msgdownpin="" msgfifthpin="" msgmenupin="" msgselectpin="" msguppin="" must="" mychar="pgm_read_byte_near(cardError" n="" name="" necessary="" need="" needed="" newfilepos="" newmode="" next="" nextbackupblocks="5000l;" nextvoltagecheck="currentTime;" nitialize="" no="" not="" of="" off="" on="" once="" only="" open="" or="" order="" out.="" out="" output="" p3setvolume="" p3writeregister="" part="" parts="" paul="" paused="" pen="" per="" pin="" pinmode="" play.="" play="" player.begin="" player.setvolume="" player="" playfile.close="" playfile.seek="" playfile="" playing:="" playing="" please="" plus="" populatefilearray="" power-up="" press="" printwelcome="" provide="" rate="" read="" reading="" reason="" register="" registers="" remaining="" reset="" resetmillis="currentTime+1000;" restored="" return="" riteregister="" run="" s="" sample="" save="" sci_bass="" sci_clockf="" sci_mode="" sci_vol="" sd="" sec="" second="" seconds="" secs="" see="" selected="" selectsd="" sending="" serial.flush="" serial.print="" set="" settings="" setup.="" setup="" setupvs="" should="" show="" showdisplay="" slow="" so="" software="" some="" speed="" spi.begin="" spi.setbitorder="" spi.setclockdivider="" spi.setdatamode="" spi.transfer="" spi="" sprintf="" start="" starting="" startup="" stay="" stereo="" stop="" stored="" such="" suitable="" switch="" switched="" switchofftime="currentTime" t="" tarting="" tempvalue="" the="" then="" this="" thisfile="" thisvolume="" time="" times="" to="" transfer="" transferendoffile="" trying="" uint16_t="" unable="" unknown="" until="" unused="" up="" usage="" user="" utterly="" v1.27="" v1.30="" values="" variables="" ve="" view="" void="" vol="" voltage="" vs1053="" vs1053b="" wait="" want="" wanteddisplaystatus="DISPLAY_BROWSING;" we="" well="" which="" while="" wil="" will="" wire.begin="" with="" work="" write="" writeregister="" wrong="" xb800="" xfe="" xfefe="" xff="" xffff="" yet="" you="" your=""&gt; 5)&lt;/2048&gt;&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp;failureToPlay = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;actionStatus = ACTION_BROWSING_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;wantedDisplayStatus = DISPLAY_BROWSING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if (playFile)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;playFile.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;/* If we're playing an mp3, HDAT1 is between FFE0 and FFFF. If the playback is failing, HDAT1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; contains 0. A soft reset and resending the file usually works.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; So: If we're playing, and have been playing for more than n seconds, but HDAT1 shows that we&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; are NOT actually playing, then: Reset the MP3 and try it again&lt;br /&gt;
&amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp;if ( (actionStatus == ACTION_PLAYING_MP3) &amp;amp;&amp;amp;&amp;nbsp; (millis() &amp;gt; resetMillis ) &amp;amp;&amp;amp; (actuallyPlaying == 0) )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DeselectSD();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mp3SelectControl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempValue16 = ReadRegister(SPI_HDAT1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (tempValue16 &amp;lt; 0xFFE0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;failureToPlay++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TransferEndOfFile();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;playFile.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mp3SoftReset();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(10);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;actionStatus = ACTION_SELECT_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedDisplayStatus = DISPLAY_BROWSING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;resetMillis = currentTime+1500;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&amp;nbsp; &amp;nbsp; // If HDAT1 contains &amp;gt;= 0xFFE0, then we are actually playing an mp3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; actuallyPlaying = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; failureToPlay = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// -----------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// We're in the middle of playing an MP3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// -----------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (actionStatus == ACTION_PLAYING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mp3DeselectControl();&amp;nbsp; &amp;nbsp; &amp;nbsp; // read 32 bytes from the file on the card into a buffer&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SelectSD();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; noOfBytesRead = playFile.read(dataBuffer, 32);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TransferMP3Data(noOfBytesRead);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (noOfBytesRead &amp;lt; 32)&amp;nbsp; &amp;nbsp; // If less than 32 bytes were read, then we're at the end of the file.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; actionStatus = ACTION_END_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //wantedDisplayStatus = DISPLAY_PLAYING; // dont set this, we want to dispay menus as well while playing.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// -----------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Pause an mp3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// -----------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (actionStatus == ACTION_PAUSED_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedDisplayStatus = DISPLAY_PAUSED; // this is wrong; we want menus whist paused also ?&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// -----------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Finish an mp3 and start playing the next track&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// -----------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (actionStatus == ACTION_END_MP3)&amp;nbsp; &amp;nbsp; // If we're at the end of the file, then transfer 2048 zeros to tell it so&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Serial.println("ENDING !");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TransferEndOfFile();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;playFile.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Play the next file.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // If we're at the last file, then repeat the last file again. (Easiest to code, sort out your&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // own requirements :-) BUGFIX: next file could be a directory ... REWRITE ? No, it will deal with&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // it and select that directory for browsing&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// while (fileType[fileNumber++] != PLAY&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fileNumber++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (fileNumber &amp;gt; numFilesInArray)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fileNumber = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sendToDisplay();&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;actionStatus = ACTION_SELECT_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//actionStatus = ACTION_BROWSING_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//wantedDisplayStatus = DISPLAY_BROWSING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Whether we're playing a file or not, we still want to change the VOLUME using the menu button&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check the Fifth button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; tempValue = digitalRead(msgFifthPin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (tempValue == HIGH&amp;nbsp; &amp;amp;&amp;amp; (millis() &amp;gt; lastButtonPress + 100) )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fifthButtonPressed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastButtonPress = millis();&amp;nbsp; &amp;nbsp; // Ensure we don't interpret a single human press as several presses...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check the SELECT button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; tempValue = digitalRead(msgSelectPin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (tempValue == HIGH&amp;nbsp; &amp;amp;&amp;amp; (millis() &amp;gt; lastButtonPress + 600) )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selectButtonPressed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastButtonPress = millis();&amp;nbsp; &amp;nbsp; // Ensure we don't interpret a single human press as several presses...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// --------------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// MENU BUTTON&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// Check to see if the menu button is pressed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// If not in Menu, Go into menu&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// If in Menu, rotate through menu options&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// If at end of menu, go back to non-menu display&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// --------------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;tempValue = digitalRead(msgMenuPin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (tempValue == HIGH &amp;amp;&amp;amp; (millis() &amp;gt; lastButtonPress + 500))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; menuButtonPressed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastButtonPress = millis();&amp;nbsp; &amp;nbsp; // Ensure we don't interpret a single human press as several presses...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check the DOWN button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // If we're playing MP3, then fast rewind.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // NOTE DIFFERENCE IN TIME - FAST REWIND REQUIRES FASTER, BECAUSE OF TIME ELAPSING WHILST PRESSING !!!&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; tempValue = digitalRead(msgDownPin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if ( tempValue == HIGH &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (actionStatus == ACTION_PLAYING_MP3) &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (currentDisplayStatus == DISPLAY_PLAYING) &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (millis() &amp;gt; lastButtonPress + 10))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastRewind();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastButtonPress = millis();&amp;nbsp; &amp;nbsp; // Ensure we don't interpret a single human press as several presses...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (tempValue == HIGH &amp;amp;&amp;amp; (millis() &amp;gt; lastButtonPress + 400)/* &amp;amp;&amp;amp; (actionStatus != ACTION_PLAYING_MP3)*/ )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; downButtonPressed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastButtonPress = millis();&amp;nbsp; &amp;nbsp; // Ensure we don't interpret a single human press as several presses...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Check the UP button&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // If we're playing an MP3, (and not in the MENU !) then fast forward, otherwise deal with it in a&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // separate function..&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; tempValue = digitalRead(msgUpPin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (tempValue == HIGH &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (actionStatus == ACTION_PLAYING_MP3) &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (currentDisplayStatus == DISPLAY_PLAYING) &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (millis() &amp;gt; lastButtonPress + 15) )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fastForward();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastButtonPress = millis();&amp;nbsp; &amp;nbsp; // Ensure we don't interpret a single human press as several presses...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (tempValue == HIGH&amp;nbsp; &amp;amp;&amp;amp; (millis() &amp;gt; lastButtonPress + 400)/*&amp;nbsp; &amp;amp;&amp;amp; (actionStatus != ACTION_PLAYING_MP3)*/ )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; upButtonPressed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastButtonPress = millis();&amp;nbsp; &amp;nbsp; // Ensure we don't interpret a single human press as several presses...&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; //&lt;br /&gt;
&amp;nbsp; // End of the main loop.&lt;br /&gt;
&amp;nbsp; //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ---------------------------------------------------------------------------&lt;br /&gt;
// Fifth button - used to restore the file and position that was ast backed up.&lt;br /&gt;
// Must be in file browsing mode.&lt;br /&gt;
// ---------------------------------------------------------------------------&lt;br /&gt;
void fifthButtonPressed()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if (actionStatus != ACTION_BROWSING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // V 1.34 Print a screen message to ack button press before waiting&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.backlight();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.setCursor(0, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myChar = pgm_read_byte(fifthButton);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(fifthButton + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;// V1.31: Before restoring the backup, check to see if MsgDownPin is ALSO being pressed:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If so, then reset the battery usage times; else restore the backup.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;delay(1000);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;tempValue = digitalRead(msgDownPin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if (tempValue == HIGH)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;resetUsageTimes();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; restoreBackup();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ---------------------------------------------------------------------------&lt;br /&gt;
// These are the FAST FORWARD and FAST REWIND functions&lt;br /&gt;
// There are 2 ways of controlling the speed; firstly, by timing the button presses&lt;br /&gt;
// (controlled in the button-press detection lines, see main loop)&lt;br /&gt;
// and secondly by the multiplier of the blocksPlayed.&lt;br /&gt;
// ---------------------------------------------------------------------------&lt;br /&gt;
void fastRewind()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // Fast Forward function&lt;br /&gt;
&amp;nbsp; if (actionStatus != ACTION_PLAYING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; SelectSD();&lt;br /&gt;
if (blocksPlayed &amp;lt; 400)&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; blocksPlayed = 400;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
long newFilePos = (blocksPlayed-400) * 32;&lt;br /&gt;
blocksPlayed = blocksPlayed - 400;&lt;br /&gt;
playFile.seek(newFilePos);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void fastForward()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // Fast Forward function - only if we're actually playing an MP3&lt;br /&gt;
&amp;nbsp; if (actionStatus != ACTION_PLAYING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; // If we're near the end of the file, then stop&lt;br /&gt;
&amp;nbsp; if (blocksPlayed+601 &amp;gt;= blocksInFile)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; SelectSD();&lt;br /&gt;
long newFilePos = (blocksPlayed+600) * 32;&lt;br /&gt;
blocksPlayed = blocksPlayed + 600;&lt;br /&gt;
playFile.seek(newFilePos);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// -----------------------------------------------------------------------------------------------&lt;br /&gt;
// These functions read the SD card, and store the filenames in memory. (There is a max)&lt;br /&gt;
// The filenames are sorted.&lt;br /&gt;
// -----------------------------------------------------------------------------------------------&lt;br /&gt;
void switchArray(byte value)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;// Paul, switch i and i+1, using a temp pointer.&lt;br /&gt;
&amp;nbsp;char *tempPointer;&lt;br /&gt;
&amp;nbsp;byte tempByte;&lt;br /&gt;
// Serial.println("Switching");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// Switch the filenames&lt;br /&gt;
&amp;nbsp;tempPointer = fileName[value-1];&lt;br /&gt;
&amp;nbsp;fileName[value-1] = fileName[value];&lt;br /&gt;
&amp;nbsp;fileName[value] = tempPointer;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// Switch the file types&lt;br /&gt;
&amp;nbsp;tempByte = fileType[value-1];&lt;br /&gt;
&amp;nbsp;fileType[value-1] = fileType[value];&lt;br /&gt;
&amp;nbsp;fileType[value] = tempByte;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Check 2 character arrays; return FALSE if #2 &amp;gt; 1;&lt;br /&gt;
// return TRUE if #2 &amp;gt; #1 and switch 1 = TRUE, 0 = FALSE&lt;br /&gt;
byte arrayLessThan(char *ptr_1, char *ptr_2)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; char check1;&lt;br /&gt;
&amp;nbsp; char check2;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; int i = 0;&lt;br /&gt;
&amp;nbsp; while (i &amp;lt; strlen(ptr_1))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial.println(i);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; check1 = (char)ptr_1[i];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial.print("Check 1 is "); Serial.print(check1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strlen(ptr_2) &amp;lt; i)&amp;nbsp; &amp;nbsp; // If string 2 is shorter, then switch them&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; check2 = (char)ptr_2[i];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//&amp;nbsp; &amp;nbsp;Serial.print("Check 2 is "); Serial.println(check2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial.print(check1); Serial.print(check2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (check2 &amp;gt; check1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (check2 &amp;lt; check1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// OTHERWISE theyre equal; check the next char !!&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void sortFileArray()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; //byte changesMade = 1;&lt;br /&gt;
&amp;nbsp; //byte&amp;nbsp; startPos = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; int innerLoop ;&lt;br /&gt;
&amp;nbsp; int mainLoop ;&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp; sendToDisplay();&lt;br /&gt;
//&amp;nbsp; delay(1000);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; for ( mainLoop = 1; mainLoop &amp;lt; numFilesInArray; mainLoop++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; innerLoop = mainLoop;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; while (innerLoop&amp;nbsp; &amp;gt;= 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (arrayLessThan(fileName[innerLoop], fileName[innerLoop-1]) == 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Serial.print("Switching ");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Serial.print(fileName[innerLoop]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Serial.print(" and ");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Serial.println(fileName[innerLoop-1]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switchArray(innerLoop);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; innerLoop--;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; Serial.println("Done");&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; sendToDisplay();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void freeMessageMemory()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // If we have previous messages, then free the memory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; for (byte i=1; i&amp;lt;=numFilesInArray; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; free(fileName[i-1]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; numFilesInArray = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fileNumber = 1;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void populateFileArray()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; Mp3SelectData();&lt;br /&gt;
&amp;nbsp; SelectSD();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; freeMessageMemory();&amp;nbsp; // Start by freeing previously allocated malloc pointers&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // The first file in the list should be '..' (parent directory)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // unless we're already in the root directory.&lt;br /&gt;
&amp;nbsp; if (strlen(currentOpenDirectory) &amp;gt; 1)&amp;nbsp; // IF we are not at the root directory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fileName[0] = (char *)malloc(3);&amp;nbsp; &amp;nbsp; // Only allocate the req'd bytes !&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sprintf(fileName[0],"..");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fileType[0] = DIR;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; numFilesInArray++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; File thisDirectory = SD.open(currentOpenDirectory);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Open the current directory&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; while(true)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;File entry =&amp;nbsp; thisDirectory.openNextFile();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (! entry)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// no more files&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Serial.println("**Read all the files");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // If it's not a valid file (test filename .mp3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // At the moment, we have a limit of n files per directory; we're running out of RAM&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (numFilesInArray &amp;lt; MAXINARRAY &amp;amp;&amp;amp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( strcasestr(entry.name(), ".mp3") != NULL ) || ( entry.isDirectory() )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; numFilesInArray++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName[numFilesInArray-1] = (char *)malloc(13);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// checkMemory();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sprintf(fileName[numFilesInArray-1],"%s",entry.name());&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Is it a directory or a playable file ?&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (entry.isDirectory())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileType[numFilesInArray-1] = DIR;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&amp;nbsp; &amp;nbsp; // else assume it's an MP3. This may not be true, of course. Your choice if your SD card has non-MP3 files.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileType[numFilesInArray-1] = PLAY;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; entry.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; thisDirectory.close();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; sortFileArray();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ==============================================================&lt;br /&gt;
// The SELECT button has been pressed.&lt;br /&gt;
// ==============================================================&lt;br /&gt;
void selectButtonPressed()&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// If the display was DIM, then turn on the display and ignore the button press.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (lcdStatus == lcdDimmed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastButtonPress = millis();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // Serial.println("Select Button !");&lt;br /&gt;
&amp;nbsp; // If we're in the MENU subsystem, then do NOTHING&lt;br /&gt;
&amp;nbsp; if (currentDisplayStatus == DISPLAY_MENU)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // If we're playing a file, and not in the menu, then pause it&lt;br /&gt;
&amp;nbsp; // If we're pausing a file, and not in the menu, then stop it&lt;br /&gt;
&amp;nbsp; // If we're in the menu, then exit it&lt;br /&gt;
&amp;nbsp; // Therefore, we must be browsing the files:&lt;br /&gt;
&amp;nbsp; // If the file type is a directory, then open that directory&lt;br /&gt;
&amp;nbsp; // If the file type is an MP3, then play it !&lt;br /&gt;
&amp;nbsp; // else flag an error, please, and work out whats going on ...&lt;br /&gt;
&amp;nbsp; if (currentDisplayStatus == DISPLAY_PLAYING)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Serial.println("Pausing it");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; backup(); // V1.36, write current file position to the backup.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; actionStatus = ACTION_PAUSED_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wantedDisplayStatus = DISPLAY_PAUSED;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if (currentDisplayStatus == DISPLAY_PAUSED)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial.println("Stopping it");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;actionStatus = ACTION_PLAYING_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedDisplayStatus = DISPLAY_PLAYING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (currentDisplayStatus == DISPLAY_BROWSING)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (fileType[fileNumber-1] == DIR)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial.println("Its a directory");&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // For the parent directory, replace the last / in the string with a \0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // If the filename starts with a '.', assume we're going up a directory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // and trim the currentOpenDirectory accordingly.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (fileName[fileNumber-1][0] == '.')&amp;nbsp; &amp;nbsp; // We're going UP a directory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial.println("Going UP a directory");&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte strLength = strlen(currentOpenDirectory) - 2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while ((currentOpenDirectory[strLength] != '/') &amp;amp;&amp;amp; (strLength &amp;gt; 0))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strLength--;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;currentOpenDirectory[strLength+1] = '\0';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;populateFileArray();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;currentDisplayStatus = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedDisplayStatus = DISPLAY_BROWSING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;actionStatus = ACTION_BROWSING_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Serial.println("Going DOWN a directory");&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sprintf(currentOpenDirectory,"%s%s/", currentOpenDirectory, fileName[fileNumber-1]);&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; populateFileArray();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentDisplayStatus = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wantedDisplayStatus = DISPLAY_BROWSING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; actionStatus = ACTION_BROWSING_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} // End of if its a directory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (fileType[fileNumber-1] == PLAY)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial.println("Selected a file ! ");&amp;nbsp; &amp;nbsp; &amp;nbsp; // We're playing a file.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //We will be playing file : fileName[fileNumber-1]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // V1.25 we're going to play a file, so show how much RAM we have left.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // V1.26 Move this to print all the time on the screen&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // printFreeMemory();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // delay(4000);&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; actionStatus = ACTION_SELECT_MP3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; } // End of If we're browsing&lt;br /&gt;
} // End of function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
// Print the list of files on the display.&lt;br /&gt;
// We currently have a 16x2 LCD connected, so display 2 files.&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
void sendToDisplay()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // If you want to see the messages on your serial monitor (eg for testing the code)&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp; for (byte i = 1; i &amp;lt;= numFilesInArray; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println(fileName[i-1]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (fileType[i-1] == DIR)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println(" - DIR");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (fileType[i-1] == PLAY)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println(" - PLAY");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
*/&lt;br /&gt;
&amp;nbsp; // Now, print the messages out to the LCD screen.&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0, 0);&lt;br /&gt;
&amp;nbsp; lcd.print(fileName[fileNumber-1]);&lt;br /&gt;
&amp;nbsp; // Print the next message on the following line, if it exists&lt;br /&gt;
&amp;nbsp; &amp;nbsp;lcd.setCursor(0, 1);&lt;br /&gt;
&amp;nbsp; if (fileNumber &amp;lt; numFilesInArray)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.print(fileName[fileNumber]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; printTimeUsage();&lt;br /&gt;
&amp;nbsp; //printFreeMemory();&lt;br /&gt;
&amp;nbsp; // Serial.println(fileName[fileNumber-1]); Serial.println(fileName[fileNumber]);&lt;br /&gt;
&amp;nbsp; currentDisplayStatus = DISPLAY_BROWSING;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
// Print a WELCOME screen for a few seconds&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
void printWelcome()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0, 0);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; myChar = pgm_read_byte(welcomeLine1);&lt;br /&gt;
&amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(welcomeLine1 + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; lcd.setCursor(0, 1);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; myChar = pgm_read_byte(welcomeLine2);&lt;br /&gt;
&amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(welcomeLine2 + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Serial.println("Welcome screen ...");&lt;br /&gt;
&amp;nbsp; delay(2000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
// Volume control: SHOW THE VOLUME&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
void showVolume()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myChar = pgm_read_byte(volume); // Print a message "Volume :" on the LCD.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(volume + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.print(thisVolume);&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Serial.print("Volume "); Serial.println(thisVolume);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; currentDisplayStatus = DISPLAY_MENU;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; currentMenuStatus = MENU_VOL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
// Print the name of the currently playing file on the LCD&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
void printFilePlaying()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myChar = pgm_read_byte(playingFile); // Print a message "Playing :" on the LCD.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(playingFile + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.setCursor(0,1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.print(fileName[fileNumber-1]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Serial.print("Playing "); Serial.println(fileName[fileNumber-1]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; currentDisplayStatus = DISPLAY_PLAYING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; printTimeUsage();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //printFreeMemory();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
// Dim the LCD after n minutes of no button presses&lt;br /&gt;
// V1.30 - 15 seconds to dim display ...&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
void dimDisplay()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; if (currentTime &amp;gt; (lastButtonPress + 10000) )&amp;nbsp; &amp;nbsp;// Time to dim the display&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (lcdStatus == lcdLit)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.noBacklight();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcdStatus = lcdDimmed;&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial.println("Dimmed");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (lcdStatus == lcdDimmed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.backlight();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcdStatus = lcdLit;&lt;br /&gt;
&amp;nbsp;//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Serial.println("Lit");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
// Print the PAUSED message&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
void printPaused()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myChar = pgm_read_byte(paused); // Print a message "Paused :" on the LCD.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(paused + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Serial.println("Pause");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; currentDisplayStatus = DISPLAY_PAUSED;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
// Ensure the correct display is displayed on the screen&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// --------------------------------------------------------------&lt;br /&gt;
void showDisplay()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // DEAL WITH MENUS FIRST&lt;br /&gt;
&amp;nbsp; if (wantedDisplayStatus == DISPLAY_MENU)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (wantedMenuStatus == MENU_VOL &amp;amp;&amp;amp; currentMenuStatus != MENU_VOL)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; showVolume();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; if (wantedDisplayStatus == DISPLAY_BROWSING &amp;amp;&amp;amp; currentDisplayStatus != DISPLAY_BROWSING)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; sendToDisplay();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; if (wantedDisplayStatus == DISPLAY_PLAYING &amp;amp;&amp;amp; currentDisplayStatus != DISPLAY_PLAYING)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; printFilePlaying();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; if (wantedDisplayStatus == DISPLAY_PAUSED &amp;amp;&amp;amp; currentDisplayStatus != DISPLAY_PAUSED)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; printPaused();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// V1.30 If we're showing the volume, and no button has been pressed for 10 seconds, return to browsing mode.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (currentDisplayStatus == DISPLAY_MENU &amp;amp;&amp;amp; (currentTime &amp;gt; lastButtonPress + 5000l ) )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wantedMenuStatus = MENU_END;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (actionStatus == ACTION_BROWSING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wantedDisplayStatus = DISPLAY_BROWSING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentMenuStatus = MENU_NOTSET;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (actionStatus == ACTION_PLAYING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wantedDisplayStatus = DISPLAY_PLAYING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentMenuStatus = MENU_NOTSET;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// End of V1.30 change.&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------&lt;br /&gt;
// The DOWN button has been pressed&lt;br /&gt;
// ------------------------------------------------------------------------&lt;br /&gt;
void downButtonPressed()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;lastButtonPress = millis();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // If the display was DIM, then turn on the display and ignore the button press.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (lcdStatus == lcdDimmed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // If we're in the menu volume, alter the volume&lt;br /&gt;
&amp;nbsp; if (currentMenuStatus == MENU_VOL)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; thisVolume = thisVolume - 10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; player.setVolume(thisVolume);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Mp3SetVolume(thisVolume, thisVolume);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; wantedMenuStatus = MENU_VOL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; currentMenuStatus = MENU_NOTSET;&amp;nbsp; &amp;nbsp; // Force the menu to be re-displayed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // If we're browsing the filelist, go down the filelist&lt;br /&gt;
&amp;nbsp; if (actionStatus == ACTION_BROWSING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; fileNumber--;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (fileNumber &amp;lt; 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileNumber = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; sendToDisplay();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------&lt;br /&gt;
// The UP button has been pressed&lt;br /&gt;
// ------------------------------------------------------------------------&lt;br /&gt;
void upButtonPressed()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;lastButtonPress = millis();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // If the display was DIM, then turn on the display and ignore the button press.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (lcdStatus == lcdDimmed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;// If we're in the menu volume, alter the volume&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if (currentMenuStatus == MENU_VOL)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;thisVolume = thisVolume + 10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;player.setVolume(thisVolume);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Mp3SetVolume(thisVolume, thisVolume);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedMenuStatus = MENU_VOL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;currentMenuStatus = MENU_NOTSET;&amp;nbsp; // Force the menu to be re-displayed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;// If we're browsing the filelist, go down the filelist&lt;br /&gt;
&amp;nbsp; &amp;nbsp;if (actionStatus == ACTION_BROWSING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fileNumber++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (fileNumber &amp;gt; numFilesInArray)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fileNumber = numFilesInArray;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sendToDisplay();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------&lt;br /&gt;
// The MENU button has been pressed&lt;br /&gt;
// If we're PAUSED then stop playing.&lt;br /&gt;
// ------------------------------------------------------------------------&lt;br /&gt;
void menuButtonPressed()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // V1.30 - ALWAYS note the time a button was pressed.&lt;br /&gt;
&amp;nbsp; lastButtonPress = millis();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // If the display was DIM, then turn on the display and ignore the button press.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (lcdStatus == lcdDimmed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;switch (currentDisplayStatus)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case DISPLAY_MENU:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedMenuStatus++;&amp;nbsp; // Rotate the menu through the options&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (wantedMenuStatus == MENU_END)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (actionStatus == ACTION_BROWSING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedDisplayStatus = DISPLAY_BROWSING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;currentMenuStatus = MENU_NOTSET;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (actionStatus == ACTION_PLAYING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedDisplayStatus = DISPLAY_PLAYING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;currentMenuStatus = MENU_NOTSET;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case DISPLAY_PAUSED:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;actionStatus = ACTION_STOP_PLAYING;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedDisplayStatus = DISPLAY_MENU;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;wantedMenuStatus = MENU_VOL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
uint16_t ReadRegister(uint8_t _reg)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; uint16_t result;&lt;br /&gt;
&amp;nbsp; //SPI.setClockDivider(SPI_CLOCK_DIV64); // PAUL !! TEST&lt;br /&gt;
&amp;nbsp; DeselectSD();&lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; awaitDataRequest();&amp;nbsp; // PAUL!!! decode time is returning random crap !&lt;br /&gt;
&amp;nbsp; Mp3SelectControl();&lt;br /&gt;
&amp;nbsp; delayMicroseconds(1); // tXCSS&lt;br /&gt;
&amp;nbsp; SPI.transfer(0x03); // Read operation&lt;br /&gt;
&amp;nbsp; awaitDataRequest();&amp;nbsp; &amp;nbsp; // Tried adding these in v1.20; makes no diff to the decodetime reg&lt;br /&gt;
&amp;nbsp; SPI.transfer(_reg); // Which register&lt;br /&gt;
&amp;nbsp; awaitDataRequest();&lt;br /&gt;
&amp;nbsp; result = SPI.transfer(0xff); // read high byte&lt;br /&gt;
&amp;nbsp; result = result &amp;lt;&amp;lt; 8;&lt;br /&gt;
&amp;nbsp; awaitDataRequest();&lt;br /&gt;
&amp;nbsp; result |= SPI.transfer(0xff); // read low byte&lt;br /&gt;
&amp;nbsp; awaitDataRequest();&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; delayMicroseconds(1); // tXCSH&lt;br /&gt;
//&amp;nbsp; awaitDataRequest();&lt;br /&gt;
&amp;nbsp;// SPI.setClockDivider(SPI_CLOCK_DIV2); // PAUL !! TEST&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; return result;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void printModeRegister()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; DeselectSD();&lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; Mp3SelectControl();&lt;br /&gt;
&amp;nbsp; uint16_t temp16 = ReadRegister(SPI_MODE);&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; //Serial.print("MODE IS ");&lt;br /&gt;
&amp;nbsp; //Serial.println(temp16, HEX);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void printAUDATARegister()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; DeselectSD();&lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; Mp3SelectControl();&lt;br /&gt;
&amp;nbsp; uint16_t temp16 = ReadRegister(SPI_AUDATA);&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; // Serial.print("AUDATA IS ");&lt;br /&gt;
&amp;nbsp; // Serial.println(temp16, HEX);&lt;br /&gt;
}&lt;br /&gt;
void printHDAT1Register()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; DeselectSD();&lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; Mp3SelectControl();&lt;br /&gt;
&amp;nbsp; uint16_t temp16 = ReadRegister(SPI_HDAT1);&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; // Serial.print("HDAT1 IS ");&lt;br /&gt;
&amp;nbsp; // Serial.println(temp16, HEX);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// -----------------------------------------------------------------------------&lt;br /&gt;
// Dispay the DECODE_TIME : the time that the track has been playing for.&lt;br /&gt;
// Note that this doesn' work, and I have no idea why not.&lt;br /&gt;
// Workaround for my own purposes: count the blocks that have been played&lt;br /&gt;
// Divide by 1000, to get a suitable displayable value.&lt;br /&gt;
// -----------------------------------------------------------------------------&lt;br /&gt;
void displayDecodeTime()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; /*&lt;br /&gt;
&amp;nbsp; if (lcdStatus == lcdDimmed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // We only need to update the display once per second&lt;br /&gt;
&amp;nbsp; if (millis()&amp;nbsp; &amp;lt; lastDecodeTime + 1000)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // We don't need to display the time if we're (eg) changing the volume.&lt;br /&gt;
&amp;nbsp; if (currentDisplayStatus != DISPLAY_PLAYING)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; tempValue16 = blocksPlayed &amp;gt;&amp;gt; 6;&amp;nbsp; &amp;nbsp; // This displays a sensible value. It does NOT, of course,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // reflect the time the song has been playing for. However, it&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // does give me a way of restarting a song at a known point.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; lcd.setCursor(1,0);&lt;br /&gt;
&amp;nbsp; lcd.print(tempValue16);&lt;br /&gt;
&amp;nbsp; lcd.print("/"); // During fast fwd / rewind, ensure there is a clear space for ease of reading screen&lt;br /&gt;
&amp;nbsp; lcd.print(blocksInFile &amp;gt;&amp;gt; 6);&lt;br /&gt;
&amp;nbsp; lcd.print(" ");&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // This _should_ display the decode time. It doesn't. return either int or 16.&lt;br /&gt;
&amp;nbsp; /*&lt;br /&gt;
&amp;nbsp; tempValue = ReadRegister(SPI_DECODE_TIME);&lt;br /&gt;
&amp;nbsp; lcd.setCursor(4,0);&lt;br /&gt;
&amp;nbsp; lcd.print(tempValue);&lt;br /&gt;
&amp;nbsp; lcd.print(" ");*/&lt;br /&gt;
&amp;nbsp; // PAUL TEMP : Write a backup every n blocks. 1000 is about 3 seconds of time.&lt;br /&gt;
&amp;nbsp; // PAUL V 1.36 too many backups destroyed the SD card. Don't backup every 5000 blocks pls.&lt;br /&gt;
&amp;nbsp; //if (blocksPlayed &amp;gt; nextBackupBlocks)&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; &amp;nbsp; nextBackupBlocks = blocksPlayed + 5000l;&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; &amp;nbsp; backup();&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; // Serial.println(temp16);&lt;br /&gt;
&amp;nbsp; lastDecodeTime = millis();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
// -----------------------------------------------------------------------------------&lt;br /&gt;
// Write out our current playfile and time&lt;br /&gt;
// -----------------------------------------------------------------------------------&lt;br /&gt;
void backup()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // If the doNotBackup flag is set (its set below on an error) then do Not Backup.&lt;br /&gt;
&amp;nbsp; // perhaps the SD card lock is in place ?&lt;br /&gt;
&amp;nbsp; if (doNotBackup == 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; SelectSD();&lt;br /&gt;
&amp;nbsp; //Serial.println("backup");&lt;br /&gt;
&amp;nbsp; backupFile = SD.open(backupFileName, FILE_WRITE);&lt;br /&gt;
&amp;nbsp; if (!backupFile)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // PAUL : Print error to screen, wait for Button 5 to be pressed, then set doNotBackup flag&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = pgm_read_byte(backupError); // Print a message "Backup Error :" on the LCD.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(backupError + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; doNotBackup = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; delay(7000);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //Serial.println("BACKUP FILE ERROR");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; backupFile.seek(0);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start at 0 each time, and overwrite the first n chars; does NOT shorten file !?&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; sprintf(tempStr, "%ld", blocksPlayed);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; backupFile.println(currentOpenDirectory);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; backupFile.println(fileNumber);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; backupFile.println(tempStr);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; backupFile.close();&amp;nbsp; &amp;nbsp; &amp;nbsp; // NOTE: This does not shorten the backup file !!!&lt;br /&gt;
&amp;nbsp;//&amp;nbsp; &amp;nbsp; &amp;nbsp;Serial.println("backup OK");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// -----------------------------------------------------------------------------------&lt;br /&gt;
// On restore button, go to the same file and approx the same place&lt;br /&gt;
// NEW 1.21: Backup file contains&lt;br /&gt;
// currentOpenDirectory \r\n&lt;br /&gt;
// fileNumber \r\n&lt;br /&gt;
// blocksPlayed \r\n&lt;br /&gt;
// -----------------------------------------------------------------------------------&lt;br /&gt;
void restoreBackup()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; Mp3DeselectControl();&lt;br /&gt;
&amp;nbsp; Mp3DeselectData();&lt;br /&gt;
&amp;nbsp; SelectSD();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; backupFile = SD.open(backupFileName, FILE_READ);&lt;br /&gt;
&amp;nbsp; if (!backupFile)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // If there's no backup file, then no worries.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // SAMPLE FILE : This is an example; note the \r \n as the line terminators.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ignore all chars after the second line terminators.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 0000000&amp;nbsp; &amp;nbsp;/&amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;D&amp;nbsp; &amp;nbsp;N&amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;G&amp;nbsp; &amp;nbsp;H&amp;nbsp; &amp;nbsp;T&amp;nbsp; &amp;nbsp;/&amp;nbsp; &amp;nbsp;I&amp;nbsp; &amp;nbsp;S&amp;nbsp; &amp;nbsp;H&amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp;L&amp;nbsp; &amp;nbsp;L&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 0000020&amp;nbsp; &amp;nbsp;~&amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp;P&amp;nbsp; &amp;nbsp;3&amp;nbsp; \r&amp;nbsp; \n&amp;nbsp; &amp;nbsp;7&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp;8&amp;nbsp; \r&amp;nbsp; \n&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;9&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 0000040&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;5&amp;nbsp; \r&amp;nbsp; \n&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Read the currentOpenDirectory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; tempValue=0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = backupFile.read();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; while (myChar != '\r' &amp;amp;&amp;amp; tempValue &amp;lt; 40)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentOpenDirectory[tempValue++] = myChar;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = backupFile.read();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; currentOpenDirectory[tempValue] = '\0';&amp;nbsp; &amp;nbsp; // Null terminate the filename&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = backupFile.read();&amp;nbsp; &amp;nbsp; // Read the following /n character&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Given the currentOpenDirectory, go and read it - this will reset the fileNumber&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;nbsp; Serial.println(currentOpenDirectory);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; populateFileArray();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Read the File Number&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; fileNumber = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = backupFile.read();&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; while (myChar != '\r' )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileNumber = (fileNumber * 10) + (myChar - 48);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = backupFile.read();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = backupFile.read();&amp;nbsp; &amp;nbsp; // Read the following /n character&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// Serial.println(fileNumber);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Read the blocksPlayed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; blocksPlayed = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = backupFile.read();&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; while (myChar != '\r' )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blocksPlayed = (blocksPlayed * 10) + (myChar - 48);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = backupFile.read();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;// Serial.println(blocksPlayed);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; backupFile.close();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myChar = pgm_read_byte(restoring); // Print a message "Restoring :" on the LCD.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(restoring + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.setCursor(0,1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; lcd.print(fileName[fileNumber - 1]);&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
//&amp;nbsp; &amp;nbsp; lcd.print(blocksPlayed);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; delay(2000);&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; Serial.println(thisFile);&lt;br /&gt;
//&amp;nbsp; &amp;nbsp; Serial.println(blocksPlayed, DEC);&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -------------------------------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // Now set up the other vars needed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; // -------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; actionStatus = ACTION_SELECT_MP3;&lt;br /&gt;
&amp;nbsp; actionRestore = 1;&lt;br /&gt;
&amp;nbsp; // To fully restore, we need the currentOpenDirectory, and the fileNumber of the current file&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// -----------------------------------------------------------------------------------&lt;br /&gt;
// checkForSleep: Put the arduino into sleep mode after n hours of usage&lt;br /&gt;
// -----------------------------------------------------------------------------------&lt;br /&gt;
void checkForSleep()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; if (currentTime &amp;lt; switchOffTime )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;// Save file position, if we were playing a file.&lt;br /&gt;
&amp;nbsp; if (actionStatus == ACTION_PLAYING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; backup();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; //&amp;nbsp; Write a message to the LCD&lt;br /&gt;
&amp;nbsp; lcd.backlight();&lt;br /&gt;
&amp;nbsp; lcd.clear();&lt;br /&gt;
&amp;nbsp; lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; tempValue = 0;&lt;br /&gt;
&amp;nbsp; myChar = pgm_read_byte(sleeping); // Print a message "Going to sleep :" on the LCD.&lt;br /&gt;
&amp;nbsp; while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; myChar = pgm_read_byte_near(sleeping + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; delay(3000);&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; // This leaves the LCD backlit (if was lit at the time of switch off)&lt;br /&gt;
&amp;nbsp; lcd.noBacklight();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Serial.end();&lt;br /&gt;
&amp;nbsp; ADCSRA = 0;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // disable ADC&lt;br /&gt;
&amp;nbsp; set_sleep_mode (SLEEP_MODE_PWR_DOWN);&lt;br /&gt;
&amp;nbsp; sleep_enable();&lt;br /&gt;
&amp;nbsp; MCUCR = _BV (BODS) | _BV (BODSE);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // turn on brown-out enable select&lt;br /&gt;
&amp;nbsp; MCUCR = _BV (BODS);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // this must be done within 4 clock cycles of above&lt;br /&gt;
&amp;nbsp; sleep_cpu ();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// Until you get your switch working, to switch the battery off to save power and waste&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// the music, about the only thing you can do is stop the play ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// PAUL: V 1.33: The action to stop playing is actionStatus = ACTION_STOP_PLAYING;&lt;br /&gt;
&lt;br /&gt;
return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
// How many minutes that the battery has been running for are stored in EEPROM memory.&lt;br /&gt;
// We record the number of minutes in pause mode, and the number of minutes in play mode.&lt;br /&gt;
// The numbers are reset manually, hopefully when you recharge the battery !&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
void getStartTimes()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // Get the minutes so far spent in PLAY mode&lt;br /&gt;
&amp;nbsp; minutesPlaying = EEPROM.read(PLAY_MSB); // hi byte&lt;br /&gt;
&amp;nbsp; minutesPlaying = minutesPlaying &amp;lt;&amp;lt; 8;&lt;br /&gt;
&amp;nbsp; minutesPlaying = minutesPlaying + EEPROM.read(PLAY_LSB); // add low byte&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // Get the minutes so far spent in PAUSE mode&lt;br /&gt;
&amp;nbsp; minutesPaused = EEPROM.read(PAUSE_MSB); // hi byte&lt;br /&gt;
&amp;nbsp; minutesPaused = minutesPaused &amp;lt;&amp;lt; 8;&lt;br /&gt;
&amp;nbsp; minutesPaused = minutesPaused + EEPROM.read(PAUSE_LSB); // add low byte&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
// Write the counters to EEPROM&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
void writeMinutesPlaying()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; byte b1 = minutesPlaying &amp;gt;&amp;gt; 8;&lt;br /&gt;
&amp;nbsp; EEPROM.write(PLAY_MSB, b1);&lt;br /&gt;
&amp;nbsp; b1 = minutesPlaying &amp;amp; 0xff;&lt;br /&gt;
&amp;nbsp; EEPROM.write(PLAY_LSB, b1);&lt;br /&gt;
&amp;nbsp; return;&lt;br /&gt;
}&lt;br /&gt;
void writeMinutesPaused()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; byte b1 = minutesPaused &amp;gt;&amp;gt; 8;&lt;br /&gt;
&amp;nbsp; EEPROM.write(PAUSE_MSB, b1);&lt;br /&gt;
&amp;nbsp; b1 = minutesPaused &amp;amp; 0xff;&lt;br /&gt;
&amp;nbsp; EEPROM.write(PAUSE_LSB, b1);&lt;br /&gt;
&amp;nbsp; return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
// Add a minute to the correct counter, and write to EEPROM&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
void addMinute()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; if (currentTime &amp;lt; addMinuteCounter)&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; addMinuteCounter = currentTime + (1000l * 60l); // Ensure we a add a minute every 60 seconds..&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; if (actionStatus == ACTION_PLAYING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; minutesPlaying++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; writeMinutesPlaying();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; minutesPaused++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; writeMinutesPaused();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // Update the screen, if we're browsing or playing ...&lt;br /&gt;
&amp;nbsp;if (actionStatus == ACTION_PLAYING_MP3 || actionStatus == ACTION_BROWSING_MP3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;printTimeUsage();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;return;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
// Reset the time used to zero.&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
void resetUsageTimes()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;lcd.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;lcd.setCursor(0,0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;tempValue = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;myChar = pgm_read_byte(resetUsage); // Print a message "Resetting Battery :" on the LCD.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;while (myChar != '\0')&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lcd.print(myChar);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myChar = pgm_read_byte_near(resetUsage + (++tempValue));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; EEPROM.write(PLAY_MSB, 0);&lt;br /&gt;
&amp;nbsp; EEPROM.write(PLAY_LSB, 1);&lt;br /&gt;
&amp;nbsp; EEPROM.write(PAUSE_MSB, 0);&lt;br /&gt;
&amp;nbsp; EEPROM.write(PAUSE_LSB, 1);&lt;br /&gt;
&amp;nbsp; getStartTimes();&lt;br /&gt;
&amp;nbsp; delay(2000);&lt;br /&gt;
&amp;nbsp; currentDisplayStatus = MENU_NOTSET; // Ensure that we reprint the correct screen, after printing the message above.&lt;br /&gt;
&amp;nbsp; return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
// Print the time spent playing and paused on the screen.&lt;br /&gt;
// ------------------------------------------------------------------------------------&lt;br /&gt;
void printTimeUsage()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; // 1.34: Convert the time spent playing and paused into mAh used and print it.&lt;br /&gt;
&amp;nbsp; // testing has show pause uses 65 mAh and play uses 85mAh&lt;br /&gt;
&amp;nbsp; // limits with floating point arithmetic suggest uising integers is more sensible.&lt;br /&gt;
&amp;nbsp; //&lt;br /&gt;
&amp;nbsp; // We convert 85 mAh into minutes - 1.417 mA per minute -&lt;br /&gt;
&amp;nbsp; //&amp;nbsp; &amp;nbsp; convert 65 mAh into minutes - 1.083 mA per minute - multiply by 1000 to do some maths then divide by 1000 again.&lt;br /&gt;
&amp;nbsp; long mahUsed = ( (minutesPlaying * 1417l) + (minutesPaused * 1083)) / 1000l;&lt;br /&gt;
&amp;nbsp; //lcd.setCursor(12,0);&lt;br /&gt;
&amp;nbsp; //lcd.print(minutesPaused);&lt;br /&gt;
&amp;nbsp; lcd.setCursor(12,1);&lt;br /&gt;
&amp;nbsp; lcd.print(mahUsed);&lt;br /&gt;
&amp;nbsp; return;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Obviously, please copy some mp3 files onto the SD card first. Try a max of 10 ? And we're using the Arduino SD library, so fat32 format please.&lt;br /&gt;
&lt;a aiotitle="click to expand" href="javascript:togglecomments('%C4%B0%C3%A7erigi G%C3%B6rebilmek %C4%B0%C3%A7in T%C4%B1klay%C4%B1n%C4%B1z..')"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The SD card you choose should be class 6 or above, class 10 is best. This is the speed that the card can read/write at. I tested a class 4 SD card; it could not be read fast enough, which caused stuttering when trying to play a file.&lt;br /&gt;
&lt;br /&gt;
The first step is to plug in the SD card reader and the LCD screen, and test that these work.&lt;br /&gt;
I'll be using a normal development breadboard as a power distribution board and for the 5 switches, until I'm happy that the components work - then, I'll solder everything into a final and permanent project.&lt;br /&gt;
(Note: The power distribution board will take power from a battery; convert it to both 5V and 3.3V and provide ample solder points for me to power all the components).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Test 1 - the screen&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Plug the screen in and test it like this :&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizYIFt-GJDKiRDtcLZC33E9zpj0SlwtpvVlsgAkP3pVQoQDT-ULCrURlpLhtrWX_R_NXqAp5TQuD76ayqDY1cCJS-k_WOA8wiBcwkxNghg1SzHJCEkWPOhEpzsb4zxUonbb-YeP_95TTY/s1600/mp3player_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="480" data-original-width="640" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizYIFt-GJDKiRDtcLZC33E9zpj0SlwtpvVlsgAkP3pVQoQDT-ULCrURlpLhtrWX_R_NXqAp5TQuD76ayqDY1cCJS-k_WOA8wiBcwkxNghg1SzHJCEkWPOhEpzsb4zxUonbb-YeP_95TTY/s400/mp3player_2.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
LCD (16 x 2) with I2C controller.&lt;br /&gt;
SDA -&amp;gt; A4&lt;br /&gt;
SCL -&amp;gt; A5&lt;br /&gt;
Obvious Vcc (5v) and GND.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaX9tscfPEvBc6w4TbC6KAL_iqDnzsnYXYZG1Az-vYBk3sRuJ1THus4kuMWX4Gan0UkGLNbai0NvggIlPhC9kJ_m8JatbgJbqlCcE8j0-NaO13YRq-bFa7U6fxavY_WqNwxBdK5banAzA/s72-c/mp3player_1.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>220 volt şebeke dijital voltmetre yapımı</title><link>https://kulogluelektronik.blogspot.com/2020/03/220-volt-sebeke-dijital-voltmetre-yapm.html</link><category>Dijital Voltmetre</category><category>Yazılım (PIC)</category><pubDate>Wed, 11 Mar 2020 12:08:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-4721039285331401546</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-indent: 35.4pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivPapD-sTikMhvXic9mQvEVIRS8KqcLyTlGGnUWHbOD9M5wlzkI1fWsGO-BjgxSp6WRy53B8CG_3yAa2wjs_RtyZZIVirjO8zh-hw4-oTmdCm8G5pvxrF1BzxbnqicjwCIV6fcxgP3xE8/s1600/ATD_WM_schem1.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="619" data-original-width="846" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivPapD-sTikMhvXic9mQvEVIRS8KqcLyTlGGnUWHbOD9M5wlzkI1fWsGO-BjgxSp6WRy53B8CG_3yAa2wjs_RtyZZIVirjO8zh-hw4-oTmdCm8G5pvxrF1BzxbnqicjwCIV6fcxgP3xE8/s320/ATD_WM_schem1.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
İşaret, R2 ve R3 dirençlerini bir 4.7k düzeltici ve bir Zener diyot VD1'in olmamasıyla devreden farklıdır.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Şebeke voltmetresinin modifiye edilmiş bir devresi de gönderildi, voltmetrenin voltajını stabilize etmek için daha iyi bir devre ile ayırt edildi.&lt;/div&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDolEdjfpVaLVtDGlURL1VJsmqFSFSjtawlxruPBz-aDDuAy-ZS1PHT5bLWjfdQraD-w1xTvVfyO8-u8IQAYbXm7llozyhvQcUNJ2M-b3gajI4uZtBRIzI1uXwPIM910SB6oT-Mv3reK0/s1600/ATD_WM_plat.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="283" data-original-width="315" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDolEdjfpVaLVtDGlURL1VJsmqFSFSjtawlxruPBz-aDDuAy-ZS1PHT5bLWjfdQraD-w1xTvVfyO8-u8IQAYbXm7llozyhvQcUNJ2M-b3gajI4uZtBRIzI1uXwPIM910SB6oT-Mv3reK0/s320/ATD_WM_plat.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnpRudZfunek52v6CUNjrygA0srdMX5_GHbcN3UXNauNpULsi6-NvsLnEpUOywkmAw8oK_tpjw3jYaASC2IsFhSqVvXnK_18odWfwNXDbWu2XaR1QRzYpEDZnrwA69FZsn1J2wzIebaV0/s1600/ATD_WM_schem2.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="601" data-original-width="910" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnpRudZfunek52v6CUNjrygA0srdMX5_GHbcN3UXNauNpULsi6-NvsLnEpUOywkmAw8oK_tpjw3jYaASC2IsFhSqVvXnK_18odWfwNXDbWu2XaR1QRzYpEDZnrwA69FZsn1J2wzIebaV0/s320/ATD_WM_schem2.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;https://kulogluelektronik.blogspot.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://yadi.sk/d/Rwk6h7P0uS3lag"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivPapD-sTikMhvXic9mQvEVIRS8KqcLyTlGGnUWHbOD9M5wlzkI1fWsGO-BjgxSp6WRy53B8CG_3yAa2wjs_RtyZZIVirjO8zh-hw4-oTmdCm8G5pvxrF1BzxbnqicjwCIV6fcxgP3xE8/s72-c/ATD_WM_schem1.gif" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>PIC16F676 mikrodenetleyici kullanarak voltmetre yapımı</title><link>https://kulogluelektronik.blogspot.com/2020/03/pic16f676-mikrodenetleyici-kullanarak.html</link><category>Dijital Voltmetre</category><category>Yazılım (PIC)</category><pubDate>Wed, 11 Mar 2020 11:47:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-8259337882381445066</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHhJE3wl7vOlEuaacSHrCrixMFLzq-KaWFrJ_G9G6HQvE8jgabdFGgz-cIumBWqpHZIBU_qeMMFxb4YN8csdE2ZXBnOE-egVkkJHU04j1pFzYk2yfTs89nPZb6tYU_CjwSfUTKSPsM1K0/s1600/AtD_platSO_Vladimir.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" data-original-height="236" data-original-width="315" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHhJE3wl7vOlEuaacSHrCrixMFLzq-KaWFrJ_G9G6HQvE8jgabdFGgz-cIumBWqpHZIBU_qeMMFxb4YN8csdE2ZXBnOE-egVkkJHU04j1pFzYk2yfTs89nPZb6tYU_CjwSfUTKSPsM1K0/s320/AtD_platSO_Vladimir.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
PIC16F676 mikrodenetleyicisindeki bir voltmetreye ayrılmış bir makale uzun süre sitede yayınlanmıştır . Zamanla, bazı ziyaretçiler voltmetrede değişiklik yaptı ve bu değişiklikleri paylaşmaya karar verdi. Bunun için minnettarlar.&lt;br /&gt;
&lt;br /&gt;
Makale, PIC16F676 üzerinde yapılan 50 voltluk bir ölçüm limiti olan bir voltmetreyi veya bu mikrodenetleyicinin ADC'sinin nasıl kullanılacağını açıklar.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color: white; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;span style="color: red; vertical-align: inherit;"&gt;&lt;b&gt;Şema (ortak anot)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwcgTrHFsM65TLX-KetQN8yrzA1Ypy5maN8iajWwnbqltY0YwubHyJUAnHbAKbPJXzGO9dlniIu-pBiQe-7Cf0qA43zt5fJwD1_79Vkp0P5bCzApq0CgxUs77tySrMyuWY13d9ks0Abe4/s1600/AtD_V2_schem_s.gif" imageanchor="1" style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="325" data-original-width="600" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwcgTrHFsM65TLX-KetQN8yrzA1Ypy5maN8iajWwnbqltY0YwubHyJUAnHbAKbPJXzGO9dlniIu-pBiQe-7Cf0qA43zt5fJwD1_79Vkp0P5bCzApq0CgxUs77tySrMyuWY13d9ks0Abe4/s400/AtD_V2_schem_s.gif" width="400" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px;"&gt;
&lt;span id="more-563"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;/div&gt;
&lt;div style="background-color: white; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;span style="color: red; vertical-align: inherit;"&gt;&lt;b&gt;Şema (ortak katot)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcZ9Mx5dwQEjoDwC0jC0truwpRTZOJUxeK35XxID4hyFiZchrt5O1MSHzIy2Fd9ylmxkOb7Auj1t-n2dqN2d_IcayH4ucsmgMdwGSqxM8wq_vDORLJ-Lsx-CfAfS2V4xIcFnL_JejQkw/s1600/scheme-ok-s.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="252" data-original-width="484" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcZ9Mx5dwQEjoDwC0jC0truwpRTZOJUxeK35XxID4hyFiZchrt5O1MSHzIy2Fd9ylmxkOb7Auj1t-n2dqN2d_IcayH4ucsmgMdwGSqxM8wq_vDORLJ-Lsx-CfAfS2V4xIcFnL_JejQkw/s400/scheme-ok-s.gif" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-indent: 35.4pt;"&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;R1 ve R2 dirençleri üzerine bir voltaj bölücü monte edilir, voltmetreyi kalibre etmek için çok turlu bir yerleşik direnç R3 kullanılır.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Kondansatör C1 voltmetreyi darbe gürültüsünden korur ve giriş sinyalini düzeltir.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Zener diyot VD1, mikro denetleyicinin girişindeki giriş voltajını sınırlamaya yarar, böylece giriş voltajı aşıldığında MK girişi yanmaz.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-indent: 35.4pt;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Transistör VT1 (KT3102 veya SMD versiyon BC847) ve R11, R12 ve R13 dirençlerinde, ikinci deşarj ile birlikte gösterge üzerindeki bir noktayı ateşleyen bir ters çevirme elemanı monte edilir.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-indent: 35.4pt;"&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;Devrede, MK'ye akım sınırlayıcı dirençler yoluyla bağlanan ortak bir anot BA56-12GWA'ya sahip bir gösterge kullanılır.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Bu gösterge düşük akım tüketimi ile karakterizedir.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Daha güçlü göstergeler (daha büyük segmentler veya farklı bir renk) kullanırken, Vladimir'in gönderilen şemasında olduğu gibi tuşların anotlara konulması önerilir.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-indent: 35.4pt;"&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-indent: 35.4pt;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Voltmetre kaynağının bir parçası olan HI-TECH PICC 9.50 derleyici&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; font-size: 12.16px; text-indent: 35.4pt;"&gt;Sonsuz bir döngüde, ADC'den gelen veriler sürekli olarak alınır, dönüştürülür ve PWM modunda 7 segmentli bir göstergeye çıkarılır.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Dikkat&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Bazı programcılar mikrodenetleyicilerin hasarında bir sorun saptamıştır. Bu, iç RC zincirinin fabrika kalibrasyon sabitinin üzerine yazmaları, ardından MK'nin yanlış çalışmaya başlaması veya hiç çalışmamaları şeklinde ifade edilir. Bu nedenle, mikro denetleyiciyi yanıp sönmeden önce, ilk önce belleğini okuyun ve denetleyicinin flash belleğinden son sözcüğü (2 bayt) yazın. Yanıp söndükten sonra, değerin kaydedilip kaydedilmediğini kontrol edin, eğer değilse, kontrol cihazını yıkayın, ancak önceden yazılmış kalibrasyon sabitiyle.&lt;br /&gt;
&lt;br /&gt;
Bu sorunu bulduğun için teşekkürler: Valery, Yuri.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;firmware&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
2013-2014 tarihli PIC16F676 için donanım sürümü v4.03 ve PIC16F688 için v5.03 sürümü. Ortak bir anot bağlayın. Ölçüm sınırı, güncelleme süresi, yanıp sönme, ayarlanan aralığın ötesine geçerseniz, programda yapılandırılır, bellenim sırasında kontrolörün EEPROM'una yazılması gereken bir dizi yapılandırma baytı elde edilir. Ölçüm sınırını voltmetreye değiştirerek, çeşitli doğrusal analog sensörler bağlayabilirsiniz.&lt;br /&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;a href="http://alex-exe.ru/files/source/ADC688OAv5.03.rar" target="_blank"&gt;&lt;span style="color: #cc0000;"&gt;&lt;span style="font-size: 12.16px;"&gt;v5.03 ile PIC16F688&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: #cc0000;"&gt;&lt;span style="font-size: 12.16px;"&gt;ürün yazılımını indirin&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;a href="http://alex-exe.ru/files/source/ADC676OAv4.03.rar" target="_blank"&gt;&lt;span style="color: #990000; font-size: 12.16px; vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="font-size: 12.16px;"&gt;v4.03&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #cc0000;"&gt;&lt;span style="font-size: 12.16px;"&gt;ile PIC16F688&lt;span style="font-size: 12.16px;"&gt;ürün yazılımını indirin&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-indent: 35.4pt;"&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;10 Nisan 2012 tarihli V3.2 voltmetrenin yeni ürün yazılımı sürümlerini sizlere sunuyoruz.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;İlk hane 0 ise kaldırılır ve 100V sürümünde göstergenin maksimum değeri 99.9V'dir.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Yazılımın kontrol edilmesi gerekiyor, donanımda test edilmedi.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Ortak anot:&lt;/span&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.2_50V_oA_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;50V'a kadar firmware indir (R1 = 47kΩ) V3.2 100V'a&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.2_100V_oA_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;kadar firmware indir (R1 = 100kΩ) V3.2&lt;/a&gt;&lt;br /&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;Ortak katot:&amp;nbsp;&lt;/span&gt;&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.2_100V_oA_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;&lt;span style="vertical-align: inherit;"&gt;50V'ye&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.2_50V_oK_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;kadar firmware indir (R1 = 47kΩ) V3.2 ortak katot 100V'a&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.2_100V_oK_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;kadar firmware indir (R1 = 100kΩ) V3.2 ortak katot&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-indent: 35.4pt;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Ürün yazılımı V3.1'in onaylanmış sürümü - gösterge titremesi kaldırıldı.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Ortak anot:&lt;/span&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.1_50V_oA_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;50V'a kadar firmware indir (R1 = 47kΩ) V3.1 100V'a&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.1_100V_oA_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;kadar firmware indir (R1 = 100kΩ) V3.1&lt;/a&gt;&lt;br /&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;Ortak katot:&amp;nbsp;&lt;/span&gt;&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.1_100V_oA_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;&lt;span style="vertical-align: inherit;"&gt;50V'ye&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.1_50V_oK_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;kadar firmware indir (R1 = 47kΩ) V3.1 ortak katot 100V'a&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/ADC676_pr_V3.1_100V_oK_pl_v2.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;kadar firmware indir (R1 = 100kΩ) V3.1 ortak katot&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Eski bellenim sürümleri (ortak anot):&lt;/span&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/AtD%20PIC16F676%2050V.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;50V'a&amp;nbsp;&lt;/a&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;a href="https://alex-exe.ru/files/source/AtD%20PIC16F676%20100V.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;&lt;span style="vertical-align: inherit;"&gt;kadar bellenimi indirin&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;a href="https://alex-exe.ru/files/source/AtD%20PIC16F676%2050V.rar" style="color: #990000;" target="_blank"&gt;&lt;span style="vertical-align: inherit;"&gt;(R1 = 47kOhm) 100V'a&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href="https://alex-exe.ru/files/source/AtD%20PIC16F676%20100V.rar" style="color: #cc0000; text-decoration-line: none;" target="_blank"&gt;kadar bellenimi indirin (R1 = 100kOhm)&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://kulogluelektronik.blogspot.com/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHhJE3wl7vOlEuaacSHrCrixMFLzq-KaWFrJ_G9G6HQvE8jgabdFGgz-cIumBWqpHZIBU_qeMMFxb4YN8csdE2ZXBnOE-egVkkJHU04j1pFzYk2yfTs89nPZb6tYU_CjwSfUTKSPsM1K0/s72-c/AtD_platSO_Vladimir.gif" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author><enclosure length="4956" type="application/x-rar-compressed" url="http://alex-exe.ru/files/source/ADC688OAv5.03.rar"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>PIC16F676 mikrodenetleyicisindeki bir voltmetreye ayrılmış bir makale uzun süre sitede yayınlanmıştır . Zamanla, bazı ziyaretçiler voltmetrede değişiklik yaptı ve bu değişiklikleri paylaşmaya karar verdi. Bunun için minnettarlar. Makale, PIC16F676 üzerinde yapılan 50 voltluk bir ölçüm limiti olan bir voltmetreyi veya bu mikrodenetleyicinin ADC'sinin nasıl kullanılacağını açıklar. Şema (ortak anot) Şema (ortak katot) R1 ve R2 dirençleri üzerine bir voltaj bölücü monte edilir, voltmetreyi kalibre etmek için çok turlu bir yerleşik direnç R3 kullanılır.&amp;nbsp;Kondansatör C1 voltmetreyi darbe gürültüsünden korur ve giriş sinyalini düzeltir.&amp;nbsp;Zener diyot VD1, mikro denetleyicinin girişindeki giriş voltajını sınırlamaya yarar, böylece giriş voltajı aşıldığında MK girişi yanmaz. Transistör VT1 (KT3102 veya SMD versiyon BC847) ve R11, R12 ve R13 dirençlerinde, ikinci deşarj ile birlikte gösterge üzerindeki bir noktayı ateşleyen bir ters çevirme elemanı monte edilir. Devrede, MK'ye akım sınırlayıcı dirençler yoluyla bağlanan ortak bir anot BA56-12GWA'ya sahip bir gösterge kullanılır.&amp;nbsp;Bu gösterge düşük akım tüketimi ile karakterizedir.&amp;nbsp;Daha güçlü göstergeler (daha büyük segmentler veya farklı bir renk) kullanırken, Vladimir'in gönderilen şemasında olduğu gibi tuşların anotlara konulması önerilir. Voltmetre kaynağının bir parçası olan HI-TECH PICC 9.50 derleyici Sonsuz bir döngüde, ADC'den gelen veriler sürekli olarak alınır, dönüştürülür ve PWM modunda 7 segmentli bir göstergeye çıkarılır. Dikkat Bazı programcılar mikrodenetleyicilerin hasarında bir sorun saptamıştır. Bu, iç RC zincirinin fabrika kalibrasyon sabitinin üzerine yazmaları, ardından MK'nin yanlış çalışmaya başlaması veya hiç çalışmamaları şeklinde ifade edilir. Bu nedenle, mikro denetleyiciyi yanıp sönmeden önce, ilk önce belleğini okuyun ve denetleyicinin flash belleğinden son sözcüğü (2 bayt) yazın. Yanıp söndükten sonra, değerin kaydedilip kaydedilmediğini kontrol edin, eğer değilse, kontrol cihazını yıkayın, ancak önceden yazılmış kalibrasyon sabitiyle. Bu sorunu bulduğun için teşekkürler: Valery, Yuri. firmware 2013-2014 tarihli PIC16F676 için donanım sürümü v4.03 ve PIC16F688 için v5.03 sürümü. Ortak bir anot bağlayın. Ölçüm sınırı, güncelleme süresi, yanıp sönme, ayarlanan aralığın ötesine geçerseniz, programda yapılandırılır, bellenim sırasında kontrolörün EEPROM'una yazılması gereken bir dizi yapılandırma baytı elde edilir. Ölçüm sınırını voltmetreye değiştirerek, çeşitli doğrusal analog sensörler bağlayabilirsiniz. v5.03 ile PIC16F688&amp;nbsp;ürün yazılımını indirin v4.03&amp;nbsp;&amp;nbsp;ile PIC16F688ürün yazılımını indirin 10 Nisan 2012 tarihli V3.2 voltmetrenin yeni ürün yazılımı sürümlerini sizlere sunuyoruz.&amp;nbsp;İlk hane 0 ise kaldırılır ve 100V sürümünde göstergenin maksimum değeri 99.9V'dir.&amp;nbsp;Yazılımın kontrol edilmesi gerekiyor, donanımda test edilmedi. Ortak anot: 50V'a kadar firmware indir (R1 = 47kΩ) V3.2 100V'a kadar firmware indir (R1 = 100kΩ) V3.2 Ortak katot:&amp;nbsp;50V'ye kadar firmware indir (R1 = 47kΩ) V3.2 ortak katot 100V'a kadar firmware indir (R1 = 100kΩ) V3.2 ortak katot Ürün yazılımı V3.1'in onaylanmış sürümü - gösterge titremesi kaldırıldı. Ortak anot: 50V'a kadar firmware indir (R1 = 47kΩ) V3.1 100V'a kadar firmware indir (R1 = 100kΩ) V3.1 Ortak katot:&amp;nbsp;50V'ye kadar firmware indir (R1 = 47kΩ) V3.1 ortak katot 100V'a kadar firmware indir (R1 = 100kΩ) V3.1 ortak katot Eski bellenim sürümleri (ortak anot): 50V'a&amp;nbsp;kadar bellenimi indirin&amp;nbsp;(R1 = 47kOhm) 100V'a kadar bellenimi indirin (R1 = 100kOhm)</itunes:subtitle><itunes:author>KulogluElectronic</itunes:author><itunes:summary>PIC16F676 mikrodenetleyicisindeki bir voltmetreye ayrılmış bir makale uzun süre sitede yayınlanmıştır . Zamanla, bazı ziyaretçiler voltmetrede değişiklik yaptı ve bu değişiklikleri paylaşmaya karar verdi. Bunun için minnettarlar. Makale, PIC16F676 üzerinde yapılan 50 voltluk bir ölçüm limiti olan bir voltmetreyi veya bu mikrodenetleyicinin ADC'sinin nasıl kullanılacağını açıklar. Şema (ortak anot) Şema (ortak katot) R1 ve R2 dirençleri üzerine bir voltaj bölücü monte edilir, voltmetreyi kalibre etmek için çok turlu bir yerleşik direnç R3 kullanılır.&amp;nbsp;Kondansatör C1 voltmetreyi darbe gürültüsünden korur ve giriş sinyalini düzeltir.&amp;nbsp;Zener diyot VD1, mikro denetleyicinin girişindeki giriş voltajını sınırlamaya yarar, böylece giriş voltajı aşıldığında MK girişi yanmaz. Transistör VT1 (KT3102 veya SMD versiyon BC847) ve R11, R12 ve R13 dirençlerinde, ikinci deşarj ile birlikte gösterge üzerindeki bir noktayı ateşleyen bir ters çevirme elemanı monte edilir. Devrede, MK'ye akım sınırlayıcı dirençler yoluyla bağlanan ortak bir anot BA56-12GWA'ya sahip bir gösterge kullanılır.&amp;nbsp;Bu gösterge düşük akım tüketimi ile karakterizedir.&amp;nbsp;Daha güçlü göstergeler (daha büyük segmentler veya farklı bir renk) kullanırken, Vladimir'in gönderilen şemasında olduğu gibi tuşların anotlara konulması önerilir. Voltmetre kaynağının bir parçası olan HI-TECH PICC 9.50 derleyici Sonsuz bir döngüde, ADC'den gelen veriler sürekli olarak alınır, dönüştürülür ve PWM modunda 7 segmentli bir göstergeye çıkarılır. Dikkat Bazı programcılar mikrodenetleyicilerin hasarında bir sorun saptamıştır. Bu, iç RC zincirinin fabrika kalibrasyon sabitinin üzerine yazmaları, ardından MK'nin yanlış çalışmaya başlaması veya hiç çalışmamaları şeklinde ifade edilir. Bu nedenle, mikro denetleyiciyi yanıp sönmeden önce, ilk önce belleğini okuyun ve denetleyicinin flash belleğinden son sözcüğü (2 bayt) yazın. Yanıp söndükten sonra, değerin kaydedilip kaydedilmediğini kontrol edin, eğer değilse, kontrol cihazını yıkayın, ancak önceden yazılmış kalibrasyon sabitiyle. Bu sorunu bulduğun için teşekkürler: Valery, Yuri. firmware 2013-2014 tarihli PIC16F676 için donanım sürümü v4.03 ve PIC16F688 için v5.03 sürümü. Ortak bir anot bağlayın. Ölçüm sınırı, güncelleme süresi, yanıp sönme, ayarlanan aralığın ötesine geçerseniz, programda yapılandırılır, bellenim sırasında kontrolörün EEPROM'una yazılması gereken bir dizi yapılandırma baytı elde edilir. Ölçüm sınırını voltmetreye değiştirerek, çeşitli doğrusal analog sensörler bağlayabilirsiniz. v5.03 ile PIC16F688&amp;nbsp;ürün yazılımını indirin v4.03&amp;nbsp;&amp;nbsp;ile PIC16F688ürün yazılımını indirin 10 Nisan 2012 tarihli V3.2 voltmetrenin yeni ürün yazılımı sürümlerini sizlere sunuyoruz.&amp;nbsp;İlk hane 0 ise kaldırılır ve 100V sürümünde göstergenin maksimum değeri 99.9V'dir.&amp;nbsp;Yazılımın kontrol edilmesi gerekiyor, donanımda test edilmedi. Ortak anot: 50V'a kadar firmware indir (R1 = 47kΩ) V3.2 100V'a kadar firmware indir (R1 = 100kΩ) V3.2 Ortak katot:&amp;nbsp;50V'ye kadar firmware indir (R1 = 47kΩ) V3.2 ortak katot 100V'a kadar firmware indir (R1 = 100kΩ) V3.2 ortak katot Ürün yazılımı V3.1'in onaylanmış sürümü - gösterge titremesi kaldırıldı. Ortak anot: 50V'a kadar firmware indir (R1 = 47kΩ) V3.1 100V'a kadar firmware indir (R1 = 100kΩ) V3.1 Ortak katot:&amp;nbsp;50V'ye kadar firmware indir (R1 = 47kΩ) V3.1 ortak katot 100V'a kadar firmware indir (R1 = 100kΩ) V3.1 ortak katot Eski bellenim sürümleri (ortak anot): 50V'a&amp;nbsp;kadar bellenimi indirin&amp;nbsp;(R1 = 47kOhm) 100V'a kadar bellenimi indirin (R1 = 100kOhm)</itunes:summary><itunes:keywords>Dijital Voltmetre, Yazılım (PIC)</itunes:keywords></item><item><title>Bootload the Arduino Mini</title><link>https://kulogluelektronik.blogspot.com/2020/03/bootload-arduino-mini.html</link><category>Arduino</category><pubDate>Tue, 10 Mar 2020 05:35:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-8680476480129663293</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="background-color: white; box-sizing: border-box; direction: ltr; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; padding: 0px;"&gt;
&lt;div style="color: #4f4e4e; font-family: &amp;quot;typoninesans regular 18&amp;quot;, &amp;quot;lucida grande&amp;quot;, lucida, verdana, sans-serif; font-size: 18px;"&gt;
&lt;span style="color: #e67e22; font-family: &amp;quot;typoninesans regular 18&amp;quot;; font-size: 30px;"&gt;What is a bootloader, and what is bootloading?&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: &amp;quot;typoninesans regular 18&amp;quot;, &amp;quot;lucida grande&amp;quot;, lucida, verdana, sans-serif;"&gt;
&lt;span style="font-family: &amp;quot;typoninesans regular 18&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: typoninesans regular 18;"&gt;The bootloader is the little program that runs when you turn the Arduino on, or press the reset button. Its main function is to wait for the Arduino software on your computer to send it a new program for the Arduino, which it then writes to the memory on the Arduino. This is important, because normally you need a special device to program the Arduino. The bootloader is what enables you to program the Arduino using just the USB cable.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: typoninesans regular 18;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: typoninesans regular 18;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: typoninesans regular 18;"&gt;When we refer to "bootloading" the Arduino, we are talking about using a special device (called an In-System Programmer or ISP) to replace the bootloader software.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #4f4e4e; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;, &amp;quot;lucida grande&amp;quot;, Lucida, Verdana, sans-serif; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; padding: 0px;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVUsOqJRRDHGtSJeoOdIZbcqNISEzjkNTyKqtM-d1yaLrTtytbyHrqKCWjVizSE5qRQiweOO-BKJ_lhqNcYDACMHUwV3UEIebeNkTA2GQCteVrwIMdpfeKeVftqPR4GdNA8GLXmAHKdM/s1600/image002.jpg" imageanchor="1" style="background-color: transparent; margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" data-original-height="318" data-original-width="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVUsOqJRRDHGtSJeoOdIZbcqNISEzjkNTyKqtM-d1yaLrTtytbyHrqKCWjVizSE5qRQiweOO-BKJ_lhqNcYDACMHUwV3UEIebeNkTA2GQCteVrwIMdpfeKeVftqPR4GdNA8GLXmAHKdM/s1600/image002.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style="color: #e67e22; font-family: &amp;quot;typoninesans regular 18&amp;quot;; font-size: large;"&gt;Why do I need to bootload the Arduino?&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; direction: ltr; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; padding: 0px;"&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;There are at least four reasons why you might need to do this:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;Your Arduino does not have a bootloader on it. This might happen if you have replaced the microcontroller with a new chip. This is unlikely to be the case with a Mini, since the chip is not replaceable, and all Minis have the bootloader installed when shipped.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;Replace the existing bootloader with a different bootloader. The bootloader on Arduinos prior to the Diecimila imposes a 10 second delay after resetting, while it waits for information from the Arduino software. This delay also occurs when the Arduino is powered up, or after programming. There are alternative bootloaders that eliminate these delays, including the Diecimila bootloader, the Adaboot bootloader, the LilyPad bootloader, and others. You can also download the source code and modify the bootloader yourself (see this page for more details and a link to the source). This is useful if you want your project to start up immediately, and especially useful if it receives serial input. If the bootloader receives any input during startup, it will think the Arduino software is trying to talk to it, and delay, possibly indefinitely, starting your program. Here is some info on alternative bootloaders.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;Not use a bootloader at all. The process for replacing the bootloader on the Arduino also lets you replace it entirely, with your own application. The advantages of doing this are that your application will start immediately, and it will give you an extra 2K of program memory. The disadvantage is that you will no longer be able to program your Arduino over USB - you will have to use the ISP (at least until you replace the bootloader).&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;The existing bootloader has somehow become corrupted. This is extremely unlikely. However, it is possible that under some circumstances the Arduino flash memory may become corrupted, and you may not be able to program the Arduino normally. Reinstalling the bootloader may fix these problems. It's kind of like reformatting your computer's hard drive.&lt;/span&gt;&lt;/div&gt;
&lt;ol style="background-color: white; box-sizing: border-box; color: #4f4e4e; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;, &amp;quot;lucida grande&amp;quot;, Lucida, Verdana, sans-serif; line-height: 1.6; list-style-position: outside; margin: 0px; padding: 0px;"&gt;
&lt;/ol&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #e67e22; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;; font-stretch: normal; font-weight: 400; line-height: 2.33333rem; margin: 2rem 0px 1.0555rem; padding: 0px;"&gt;
&lt;span style="font-size: large;"&gt;
How is bootloading the Arduino Mini different from programming other Arduinos?&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style="font-size: medium;"&gt;Regular-size Arduinos have a 6 pin connector for the ISP. The Arduino Mini does not have this, so you have to make a connector cable. Other than this, the procedure is the same. With slight variations on the process, you can bootload many different configurations of Atmel-based projects.&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #e67e22; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;; font-stretch: normal; font-weight: 400; line-height: 2.33333rem; margin: 2rem 0px 1.0555rem; padding: 0px;"&gt;
&lt;span style="font-size: large;"&gt;
What do I need?&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="background-color: white; box-sizing: border-box; direction: ltr; line-height: 1.6; list-style-position: outside; list-style-type: none; margin: 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="box-sizing: border-box; direction: ltr; margin: 0.235294rem 0px; padding: 0px; text-indent: -18px;"&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; direction: ltr; margin: 0.235294rem 0px; padding: 0px;"&gt;&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;An ISP (eg. AVR ISP MkII)&lt;/span&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; direction: ltr; margin: 0.235294rem 0px; padding: 0px;"&gt;&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;6 pieces of wire&lt;/span&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; direction: ltr; margin: 0.235294rem 0px; padding: 0px;"&gt;&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;One piece of male header strip, with 12 pins&lt;/span&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; direction: ltr; margin: 0.235294rem 0px; padding: 0px;"&gt;&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;Two pieces of male header stip, 3 pins each&lt;/span&gt;&lt;/li&gt;
&lt;li style="box-sizing: border-box; direction: ltr; margin: 0.235294rem 0px; padding: 0px;"&gt;&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;8 AVR Studio software (from Atmel, free download)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #e67e22; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;; font-stretch: normal; font-weight: 400; line-height: 2.33333rem; margin: 2rem 0px 1.0555rem; padding: 0px;"&gt;
&lt;span style="font-size: large;"&gt;
How do I make the cable?&lt;/span&gt;&lt;/h3&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
You need to connect 6 pins on the Arduino Mini to six pins on the ISP. The six pins are called MISO, MOSI, SCK, RESET, Power and Ground. Three of them correspond to digital I/O pins, numbered 11 - 13. The other three are the Reset, +5V and Ground pins you have probably already been using. (Note that you want to use the +5V pin, not the +9V pin. This is used to supply power to the ISP.)&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9bZeNW0cu0dJPoybLWPbRgJLdu3lwqX4p5-9t1yXuWrBwFOJGQR9oQUNdbHzETM6DK00Wg4R1dvFDuhPY6CCgBKcnqMWjL9zBhj5vwbaijXf0SwJVDwxSseupG4-FU_S_uAR9EpTr4tY/s1600/image006.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="253" data-original-width="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9bZeNW0cu0dJPoybLWPbRgJLdu3lwqX4p5-9t1yXuWrBwFOJGQR9oQUNdbHzETM6DK00Wg4R1dvFDuhPY6CCgBKcnqMWjL9zBhj5vwbaijXf0SwJVDwxSseupG4-FU_S_uAR9EpTr4tY/s1600/image006.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Note that this is the view from the back of the connector. If you hold the connector by the ribbon, with the red stripe uppermost, and the connector facing away from you, this is what you will see.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
A simple way to make the connecting cable is to start with 6 pieces of wire, a piece of male header strip with 12 pins, and two pieces of header strip with 6 pins. Remove the 2nd through the 4th pins of the long strip using needle nose pliers. Remove the 9th through the 11th pins as well. Remove all the pins from the two smaller sections of male header.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Insert the wires corresponding to ground, reset and power (in that order) in the holes left by the 2nd through 4th pins. Insert the wires corresponding to SCK, MISO and MOSI (in that order) into the holes left by the 9th through 11th pins. Then, take the other ends of the wires, and put MISO, SCK, and RESET into piece, and Power, MOSI, and Ground into the other pieces. (Note that MOSI and Reset "swap sides", so to speak.) Trim the wires so they are all the same length. It is a good idea to use some hot glue to keep everything in place. It is easiest do this by plugging the two segments with 3 headers into the ISP cable (double-check they are correct!) and adding a drop of glue. (Don't glue the ISP cable itself.) You should have a cable that looks like this:&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9bZeNW0cu0dJPoybLWPbRgJLdu3lwqX4p5-9t1yXuWrBwFOJGQR9oQUNdbHzETM6DK00Wg4R1dvFDuhPY6CCgBKcnqMWjL9zBhj5vwbaijXf0SwJVDwxSseupG4-FU_S_uAR9EpTr4tY/s1600/image006.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="253" data-original-width="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9bZeNW0cu0dJPoybLWPbRgJLdu3lwqX4p5-9t1yXuWrBwFOJGQR9oQUNdbHzETM6DK00Wg4R1dvFDuhPY6CCgBKcnqMWjL9zBhj5vwbaijXf0SwJVDwxSseupG4-FU_S_uAR9EpTr4tY/s1600/image006.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Note that the pins on the ends are not connected to anything - I did this so that the header would be exact length of the Arduino Mini, making it easier to align. Note the order of the wires relative to the red strand on the programmer cable. When the red strand is on the top, and the cable is on the far side of the connector, the colors are white (MISO), green (SCK) and yellow (RESET). In the picture below, with the red strand on the bottom, and the ribbon cable on the near side, the cables are black (GND), blue (MOSI) and red (+5V):&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFKZMzcv9rJ19J8orq-M1B8-Mrwuc0_OVjINe_Ss6JP0p1whowajPi3nQFFBk_bc0f70LZpA8pmf9_PxVQ9TB47OnpWDn8oo-qoRP-pQ_QFPdPTMeSX97BtfUz9_8OT9xnHhhgZneTVoo/s1600/image010.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="252" data-original-width="378" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFKZMzcv9rJ19J8orq-M1B8-Mrwuc0_OVjINe_Ss6JP0p1whowajPi3nQFFBk_bc0f70LZpA8pmf9_PxVQ9TB47OnpWDn8oo-qoRP-pQ_QFPdPTMeSX97BtfUz9_8OT9xnHhhgZneTVoo/s400/image010.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
Mount your Arduino Mini on a breadboard, as shown (note that you will have to remove the LED on pin 13 during programming):&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKrJ5anzS7neGvoLGcGZW_vGZFaNpaYxaA1uYafie7UR-HDLxhF_szHlizty1ZfpDyGWBuDyFnnMJCDonx-76hOSmbqFAR8fNGX4opZ2VLxwrQvbRatMxIplrGivtDwMh7-qdrjPjAqCc/s1600/image012.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="252" data-original-width="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKrJ5anzS7neGvoLGcGZW_vGZFaNpaYxaA1uYafie7UR-HDLxhF_szHlizty1ZfpDyGWBuDyFnnMJCDonx-76hOSmbqFAR8fNGX4opZ2VLxwrQvbRatMxIplrGivtDwMh7-qdrjPjAqCc/s1600/image012.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Line up the male header with 12 pins along the side of the Arduino Mini, so that it lines up with the pins. The Power, Reset and Ground wires should line up. (Note that the LED has been removed.) It should look like this:&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis-ncJuYoF1GrUsnLg9JU6HdJc8Vl1u8pUeA1DVMS1qj1eO8eYrtwtIXrxfnCI58ckLnnQZe-LSR8tSQMTj7WNPJ2rFGi4DBOmkc_mUx3GIYvpNDx1Kv_hKblVs4WEKmQSUALpxOdozec/s1600/image014.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="252" data-original-width="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis-ncJuYoF1GrUsnLg9JU6HdJc8Vl1u8pUeA1DVMS1qj1eO8eYrtwtIXrxfnCI58ckLnnQZe-LSR8tSQMTj7WNPJ2rFGi4DBOmkc_mUx3GIYvpNDx1Kv_hKblVs4WEKmQSUALpxOdozec/s1600/image014.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; direction: ltr; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; padding: 0px;"&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;These pins on the Arduino have to be connected to the corresponding pins on the 6-pin connector coming from the ISP, shown below.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;If you are using a USB adapter with your Arduino Mini, plug it into your computer now. If you are not, plug in whatever power source you are using. The Arduino must be powered for ISP to work.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;Plug the USB cable from the ISP into your computer now. You should see two green LEDs light up on the programmer. Note: you should not have anything plugged into pins 11-13 of the Arduino. This may interfere with the operation of the programmer.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="color: #4f4e4e; font-family: typoninesans regular 18, lucida grande, lucida, verdana, sans-serif;"&gt;From this point on, the instructions are exactly the same as those for bootloading any Atmel 168 microcontroller. You can use the instructions elsewhere on this site, or continue on&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #e67e22; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;; font-stretch: normal; font-weight: 400; hyphens: none; line-height: 2.33333rem; margin: 2rem 0px 1.0555rem; padding: 0px; text-rendering: optimizelegibility;"&gt;
&lt;span style="font-size: large;"&gt;How to load the bootloader using Arduino environment?&lt;/span&gt;&lt;/h3&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #4f4e4e; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;, &amp;quot;lucida grande&amp;quot;, Lucida, Verdana, sans-serif; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; padding: 0px;"&gt;
&lt;span style="font-size: xx-small;"&gt;You can now bootload the Arduino using the Arduino environment. Open Arduino on your computer, set the type of board you are using (Arduino Mini), open the Burn Bootloader menu and choose your programmer. (In this example, AVRISP&amp;nbsp;&lt;span class="wikiword" style="box-sizing: border-box;"&gt;MkII&lt;/span&gt;.)&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj75PpQ93bN58_-23wpgckCGCyP9VXjgvE36FY-Y2O-piqfTVMa290roh8XzYnlH1XicjKPASjT_NBk_teHRBI9XItvO1QDvc7Mth7H5JyiadkeZWPA6jJyx7EpaeoU2VVeg73C6dW-3z8/s1600/image016.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="421" data-original-width="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj75PpQ93bN58_-23wpgckCGCyP9VXjgvE36FY-Y2O-piqfTVMa290roh8XzYnlH1XicjKPASjT_NBk_teHRBI9XItvO1QDvc7Mth7H5JyiadkeZWPA6jJyx7EpaeoU2VVeg73C6dW-3z8/s1600/image016.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #4f4e4e; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;, &amp;quot;lucida grande&amp;quot;, Lucida, Verdana, sans-serif; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; padding: 0px;"&gt;
&lt;span style="font-size: xx-small;"&gt;Unlike regular Arduino programming, you don't have to press the reset switch. The programmer resets the Arduino for you. This will install (or restore) the original Arduino bootloader. However, this is of little benefit, unless you are trying repair the bootloader, or your mini somehow came without one.&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="background-color: white; box-sizing: border-box; color: #e67e22; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;; font-stretch: normal; font-weight: 400; hyphens: none; line-height: 2.33333rem; margin: 2rem 0px 1.0555rem; padding: 0px; text-rendering: optimizelegibility;"&gt;
&lt;span style="font-size: large;"&gt;How to load the bootloader using&amp;nbsp;&lt;span class="wikiword" style="box-sizing: border-box;"&gt;AVRStudio&lt;/span&gt;?&lt;/span&gt;&lt;/h3&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #4f4e4e; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;, &amp;quot;lucida grande&amp;quot;, Lucida, Verdana, sans-serif; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; padding: 0px;"&gt;
&lt;span style="font-size: xx-small;"&gt;To install an alternative bootloader, you will need a piece of software called AVR Studio. Download it from&amp;nbsp;&lt;a class="urllink" href="http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725" rel="nofollow" style="box-sizing: border-box; color: #00979c; line-height: inherit;" target="_blank"&gt;here&lt;/a&gt;. Unfortunately, AVR Studio only exists for the Windows environment. However, you can use the instructions for bootloading the Atmel168 on Mac OS/X.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #4f4e4e; direction: ltr; font-family: &amp;quot;typoninesans regular 18&amp;quot;, &amp;quot;lucida grande&amp;quot;, Lucida, Verdana, sans-serif; margin-bottom: 1.5em; margin-left: auto; margin-right: auto; padding: 0px;"&gt;
&lt;span style="font-size: xx-small;"&gt;Run AVR Studio. Press cancel to skip the opening screen.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIZJy_Ccz7UfFjwgOgOPiP5WS2WU79OTHHPG0dBuWfvrlUOQAALvllpOMmVpKSRyFhMXo58yZF5u_8NDfJVe7XdBwdu-GN1lZexPVkSTY3X6hCZUNA1jG0Cu_R5KJlSLWu5s7qIPI0Wbg/s1600/image018.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="252" data-original-width="386" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIZJy_Ccz7UfFjwgOgOPiP5WS2WU79OTHHPG0dBuWfvrlUOQAALvllpOMmVpKSRyFhMXo58yZF5u_8NDfJVe7XdBwdu-GN1lZexPVkSTY3X6hCZUNA1jG0Cu_R5KJlSLWu5s7qIPI0Wbg/s1600/image018.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Press the Con button. It is the tiny little button labeled "CON" that looks like a little chip. Then, select the type of ISP that you are using: in this example, AVR ISP Mk II.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxPEKawtw1802RlgnY_oLQrF-Cn01MJyhi-U1aGZDFtacgQP3NVv1f_j9M8xvrdkYA6QMTAB97RVXqlBw4xcaNsi9oLpQr9SNJcmV0IRbddVKIfmYX-tCN4G7RZK4nm0gSGzyCIUoUb74/s1600/image020.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="310" data-original-width="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxPEKawtw1802RlgnY_oLQrF-Cn01MJyhi-U1aGZDFtacgQP3NVv1f_j9M8xvrdkYA6QMTAB97RVXqlBw4xcaNsi9oLpQr9SNJcmV0IRbddVKIfmYX-tCN4G7RZK4nm0gSGzyCIUoUb74/s1600/image020.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
You will see the firmware upload dialog box, as shown below. Confirm that all the settings are as shown in the dialog. In the field "input HEX file", browse to the file you want to upload. This can be either:&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
A new bootloader&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
A program of your own. The .hex file will be stored in the applet folder within your Arduino sketch's folder.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZmzIEm6z0SBVf18_uVhRg9nD0puEewIVx0JY-DIEjA8JCrYxumnRULQXZ01LH_OXPSBf4nVD67z69osl_NnZVo9MrKBJ2Pl19E64IC3E2i7UfeLPLp9g74wsTvnpTg40vxWlWRnOHLw/s1600/image022.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="374" data-original-width="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZmzIEm6z0SBVf18_uVhRg9nD0puEewIVx0JY-DIEjA8JCrYxumnRULQXZ01LH_OXPSBf4nVD67z69osl_NnZVo9MrKBJ2Pl19E64IC3E2i7UfeLPLp9g74wsTvnpTg40vxWlWRnOHLw/s1600/image022.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Press the "Program" button. You should see some activity in the status window. Press "Verify" if you want to confirm that everything is OK. Disconnect the ISP by removing its USB cable from the computer. If you want to play it safe, remove power from your Arduino. Disconnect the ISP header from your breadboard.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Your Arduino Mini is now bootloaded!&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background: #f56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;https://kulogluelektronik.blogspot.com
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://kulogluelektronik.blogspot.com/"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVUsOqJRRDHGtSJeoOdIZbcqNISEzjkNTyKqtM-d1yaLrTtytbyHrqKCWjVizSE5qRQiweOO-BKJ_lhqNcYDACMHUwV3UEIebeNkTA2GQCteVrwIMdpfeKeVftqPR4GdNA8GLXmAHKdM/s72-c/image002.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Arduino Single-Sided Serial Board </title><link>https://kulogluelektronik.blogspot.com/2020/03/arduino-single-sided-serial-board.html</link><category>Arduino</category><category>Kendin Yap</category><pubDate>Tue, 10 Mar 2020 04:24:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-3575700677330985150</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivx-DE8HBsniXLXnZPmedo1-EZ7nwpJfwXjUfudqEsfzmUPvfo0eA3xM43lSzkKWiuIYle754HXdJaNfNG_U0vI4FwXCfwQPpj-lgeUBfVNg_UexLc6sbk_5a8Mmj3NjlfEAuGmHcKqXM/s1600/ArduinoSeverino400.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="281" data-original-width="400" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivx-DE8HBsniXLXnZPmedo1-EZ7nwpJfwXjUfudqEsfzmUPvfo0eA3xM43lSzkKWiuIYle754HXdJaNfNG_U0vI4FwXCfwQPpj-lgeUBfVNg_UexLc6sbk_5a8Mmj3NjlfEAuGmHcKqXM/s320/ArduinoSeverino400.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don't have an easy way to order an Arduino board or kit, you can etch this PCB design by hand and solder it together. It is pin-compatible with the Arduino Diecimila, and should work with any Arduino shield.&lt;br /&gt;
&lt;br /&gt;
This is the third revision of the board: the Arduino Single-Sided Serial version 3, or s3v3, or Arduino Severino. It was designed by Adilson Akashi, based on the previous version.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A4 Image for Toner Transfer (.png)&lt;br /&gt;
&lt;div style="background: #56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;a href="https://www.arduino.cc/en/uploads/Main/Arduino_S3v3_R2_A4_4x2.png"&gt;https://www.arduino.cc/en/uploads/Main/Arduino_S3v3_R2_A4_4x2.png&lt;/a&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Schematic (.png)&lt;br /&gt;
&lt;div style="background: #56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;a href="https://www.arduino.cc/en/uploads/Main/ArduinoSeverinoSchematic.png"&gt;https://www.arduino.cc/en/uploads/Main/ArduinoSeverinoSchematic.png&lt;/a&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Mounting diagram (.png)&lt;br /&gt;
&lt;div style="background: #56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;a href="https://www.arduino.cc/en/uploads/Main/ArduinoSeverinoMountingDiagram.png"&gt;https://www.arduino.cc/en/uploads/Main/ArduinoSeverinoMountingDiagram.png&lt;/a&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
Manual (.pdf)&lt;br /&gt;
&lt;div style="background: #56ffaa; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;a href="https://www.arduino.cc/en/uploads/Main/ArduinoSeverinoMountingDiagram.png"&gt;https://www.arduino.cc/en/uploads/Main/ArduinoSeverinoManual2.pdf&lt;/a&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="https://yadi.sk/d/gYMwTxcaxl8CcA"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivx-DE8HBsniXLXnZPmedo1-EZ7nwpJfwXjUfudqEsfzmUPvfo0eA3xM43lSzkKWiuIYle754HXdJaNfNG_U0vI4FwXCfwQPpj-lgeUBfVNg_UexLc6sbk_5a8Mmj3NjlfEAuGmHcKqXM/s72-c/ArduinoSeverino400.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Board with WIFI Websocket Camera Demo</title><link>https://kulogluelektronik.blogspot.com/2020/03/board-with-wifi-websocket-camera-demo.html</link><category>Arduino</category><pubDate>Mon, 9 Mar 2020 22:21:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-972084334643706373</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk6gihjQPTN8flR9tgabTUbvDH0eBJXD6J2UXf1Z0BxAZfS1JbXiYPEtBKx36m1x6r52DSAkqf3l1KtFW1-cwjJtEaR7LaFv1JtgEcj8pxyzG-IN-zbmpNF80kPIrnB1L6YEmfGvkWg_s/s1600/ESP8266_demo.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="400" data-original-width="600" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk6gihjQPTN8flR9tgabTUbvDH0eBJXD6J2UXf1Z0BxAZfS1JbXiYPEtBKx36m1x6r52DSAkqf3l1KtFW1-cwjJtEaR7LaFv1JtgEcj8pxyzG-IN-zbmpNF80kPIrnB1L6YEmfGvkWg_s/s320/ESP8266_demo.jpg" width="320" /&gt;&lt;/a&gt;It is good news to hear that the Arduino IDE support was announced on the ESP8266 community forum, the source code can be found from . It is more than another Arduino board, but can be thought as an Arduino combined with a WIFI shield. With faster CPU speed and much smaller form of factor, most important the less than $10USD price is more attractive, you are worth to try although there are also some limitations. Setup is fairly simple with downloads for Linux, OS X, and Windows. A more detailed setup can be found from the adafruit guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
Now ArduCAM ports our camera libraries for ESP8266, you can use the ESP8266 module with ArduCAM modules to take high quality high resolution photos and save to SD card, or even to publish the photos to webpage. In this tutorial we will use ESP8266 arduino board to take photos and publish to webpage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;Websocket Background&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
In order to transfer a photo to webpage, I have to briefly introduce the technology of websocket first. WebSocket is a protocol providing full-duplex communication channels over a single TCP connection. It is designed to be implemented in web browsers and web servers, so it can be used by any client and any platform like PCs, laptops, pads and smart phones. The standard HTTP protocol which is C/S based architecture, a client send a request to a server, the server send the information requested back to the client and close connection immediately. Unlike the standard HTTP protocol, the websocket protocol only use HTTP protocol for the handshake stage and keep the connection open afterward. It allows bi-directional conversation between a browser and the server. Detail websocket description can be found from wiki.&lt;br /&gt;
&lt;br /&gt;
In this demo, we create a websocket server on the ESP8266 arduino borad. It connects to a user defined WIFI router by DHCP, then you can connect to this server via your web browser.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: red;"&gt;Hardware connection&lt;/span&gt;&lt;br /&gt;
The connection between the ESP8266 board and ArduCAM mini is shown as the following picture and table.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPs7uyTWSWe2ctPplb1RDEkuffbnUPHxmGHup1dIcLkG6taDfhyphenhyphen0TvIfYw4OrTw3D9hX1xc7PAUmEtQyucFQFU4GyYLIgAIyIfkF7TWuM8Gw7p5NRsNkLcIm10m_-wmQyUaT1cUsVsTUs/s1600/ESP8266_diagram-1-174x300.webp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="300" data-original-width="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPs7uyTWSWe2ctPplb1RDEkuffbnUPHxmGHup1dIcLkG6taDfhyphenhyphen0TvIfYw4OrTw3D9hX1xc7PAUmEtQyucFQFU4GyYLIgAIyIfkF7TWuM8Gw7p5NRsNkLcIm10m_-wmQyUaT1cUsVsTUs/s1600/ESP8266_diagram-1-174x300.webp" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4vzSQCD4D0lkrhHPEpe-YE1U-_4JAfS1zaadXRGfpzeHykbup1cx093pHFgWWD4O8yAzTu2rQ0lym0Z5lWgeN1J07th7uQlMATz5Blx56rGhq_aoR-cjvtgKrClOHCitfQ3hTONvdT0A/s1600/ESP8266_wiring_table-1-300x190.webp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="190" data-original-width="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4vzSQCD4D0lkrhHPEpe-YE1U-_4JAfS1zaadXRGfpzeHykbup1cx093pHFgWWD4O8yAzTu2rQ0lym0Z5lWgeN1J07th7uQlMATz5Blx56rGhq_aoR-cjvtgKrClOHCitfQ3hTONvdT0A/s1600/ESP8266_wiring_table-1-300x190.webp" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="color: red;"&gt;Arduino Sketches and library&lt;/span&gt;&lt;br /&gt;
Before running the demo sketch, you need to copy three libraries ArduCAM, UTFT4ArduCAM_SPI and ESP8266-Websocket to the Arduino libraries folder.&lt;br /&gt;
&lt;br /&gt;
Open the demo sketch &lt;a href="https://yadi.sk/d/_6jrN7u8h5gf7w" target="_blank"&gt;ArduCAM_Mini_OV2640_websocket_server.ino&lt;/a&gt;, change the following line according to your own wifi AP router, then upload.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background: #f8f8f8; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;const char* ssid = "your_ssid";
const char* password = "your_passpwd";
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcUf7QJYzOTfRZevPOR5toPhp_42OzAV_w3W5fzKpqSMW_oQOI_3pZ0B0-87B7PSrLQjsFMSdfQ2e0yWAvoFcORdkvv7MSUPw10q2JO1VNqVOj2MOS9AHO_sYQiPBTfMpDQz2flk8fBy4/s1600/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo1-1024x692.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="692" data-original-width="1024" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcUf7QJYzOTfRZevPOR5toPhp_42OzAV_w3W5fzKpqSMW_oQOI_3pZ0B0-87B7PSrLQjsFMSdfQ2e0yWAvoFcORdkvv7MSUPw10q2JO1VNqVOj2MOS9AHO_sYQiPBTfMpDQz2flk8fBy4/s400/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo1-1024x692.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb2g3OEoUHeUvblkslZ0Aqo4FC2maGxzPykXXK2C5-BdsThQCbqq7ewRzBIg6-aS3nZbMQANaeX3kkHkew2X9A7ajJrbYk7PFc0LVuQDgqO0xUo_FBF9ah-FiNzuduMDrw1ZvbNW7ZXHI/s1600/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo2.webp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="639" data-original-width="827" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb2g3OEoUHeUvblkslZ0Aqo4FC2maGxzPykXXK2C5-BdsThQCbqq7ewRzBIg6-aS3nZbMQANaeX3kkHkew2X9A7ajJrbYk7PFc0LVuQDgqO0xUo_FBF9ah-FiNzuduMDrw1ZvbNW7ZXHI/s400/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo2.webp" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3KJLcc1XrBEogAjHvZlSJBpuE-L7X-BcfR6cfcmqcGOGWiE_myn80QJN4eygOkY3_iFGF0XQQJmWKeFeO_lAZY590U2FOcqfHlgTTKQzC-tyouWHxpw2NURmH65ooEf_cwvKomS3qL6A/s1600/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo3-1024x611.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="611" data-original-width="1024" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3KJLcc1XrBEogAjHvZlSJBpuE-L7X-BcfR6cfcmqcGOGWiE_myn80QJN4eygOkY3_iFGF0XQQJmWKeFeO_lAZY590U2FOcqfHlgTTKQzC-tyouWHxpw2NURmH65ooEf_cwvKomS3qL6A/s400/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo3-1024x611.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT42Q6w8f3u06iuKNLjrqi9GJMxJIIycNRHuhC1ITDFWEEZ37eQJTKjnUF1jEU0O2Pf4HcF20apQtdVyWFfGq2j9m9pAo3er0kl1nkjnrFYmJjgJKqFNlNmMMJnPxMO0_owPYrO5ITN60/s1600/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo4-1024x609.webp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="609" data-original-width="1024" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT42Q6w8f3u06iuKNLjrqi9GJMxJIIycNRHuhC1ITDFWEEZ37eQJTKjnUF1jEU0O2Pf4HcF20apQtdVyWFfGq2j9m9pAo3er0kl1nkjnrFYmJjgJKqFNlNmMMJnPxMO0_owPYrO5ITN60/s400/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo4-1024x609.webp" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Provide you now have the IP address 192.168.1.105 for websocket server, and open the camera_demo.html located in your C:\Users\[YOUR COMPUTER]\AppData\Local\Arduino15\packages\ArduCAM_ESP8266_UNO\hardware\ArduCAM_ESP8266_UNO\2.2.4\libraries\ArduCAM\examples\ESP8266\ArduCAM_ESP8266_UNO_Capture\html_2640 folder from your web browser. Change the websocket IP address get from the serial monitor marked in red box in the picture.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcTMmgeNYi5TKeguGJNamDhfvrPBF4h8gXLHNI0mKg5077uk_MXd5SKSzxhHLpdpIajRTZht4YD2rlvIr8fBx6UN3r1D1ryIfgHfoA93vt9M3sy89UhzllMXXKMz87iKfrNSvpNlPsey4/s1600/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo5-2-1024x531.webp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="531" data-original-width="1024" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcTMmgeNYi5TKeguGJNamDhfvrPBF4h8gXLHNI0mKg5077uk_MXd5SKSzxhHLpdpIajRTZht4YD2rlvIr8fBx6UN3r1D1ryIfgHfoA93vt9M3sy89UhzllMXXKMz87iKfrNSvpNlPsey4/s400/ArduCAM-now-Supports-ESP8266-Arduino-Board-with-WIFI-Websocket-Camera-Demo5-2-1024x531.webp" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Click the “Connect” button, you will see the websocket connection request from the serial monitor. After few seconds, the webpage will notify the successful connection established.&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
After that you can click the send button to send a websocket message to ESP8266. It will trigger the capture command on the ESP8266 Arduino side, and it will send back the captured image and display on the webpage.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://yadi.sk/d/_6jrN7u8h5gf7w"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk6gihjQPTN8flR9tgabTUbvDH0eBJXD6J2UXf1Z0BxAZfS1JbXiYPEtBKx36m1x6r52DSAkqf3l1KtFW1-cwjJtEaR7LaFv1JtgEcj8pxyzG-IN-zbmpNF80kPIrnB1L6YEmfGvkWg_s/s72-c/ESP8266_demo.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>pic16f676 mikrodenetleyici üzerine voltmetre yapımı</title><link>https://kulogluelektronik.blogspot.com/2020/03/pic16f676-mikrodenetleyici-uzerine.html</link><category>Dijital Voltmetre</category><category>Yazılım (PIC)</category><pubDate>Mon, 9 Mar 2020 21:39:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-4636392850449075220</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Makale, PIC16F676 üzerinde yapılan 50 voltluk bir ölçüm limiti olan bir voltmetreyi veya bu mikrodenetleyicinin ADC'sinin nasıl kullanılacağını açıklar.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjylwVULQVSaqlo1OUwYr64Lq4pf69i-U8i2XlBc3qHsRAOzy6WAcEYar-lI2qx2j6rc8fZa3QTxYvNuvtwAEvWC_r0YY9-qLQ71x3z1T2R12kAOT4uR-qcVCo-zpmDjrRSf4_Cds5qWtE/s1600/AtD_PIC16F676_7seg_scheme.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="402" data-original-width="732" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjylwVULQVSaqlo1OUwYr64Lq4pf69i-U8i2XlBc3qHsRAOzy6WAcEYar-lI2qx2j6rc8fZa3QTxYvNuvtwAEvWC_r0YY9-qLQ71x3z1T2R12kAOT4uR-qcVCo-zpmDjrRSf4_Cds5qWtE/s400/AtD_PIC16F676_7seg_scheme.gif" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
PIC16F676 üzerindeki voltmetre devresi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R1 ve R3 dirençleri benim tarafımdan çok iyi seçilmedi, çünkü Göstergenin ikinci segmenti biraz loş yanıyor, değerlerinizi seçmenizi tavsiye ederim. Transistör VT1 KT3102'yi kullandı, başka bir npn transistörü ile değiştirilebilir.&lt;br /&gt;
&lt;br /&gt;
Voltmetre kaynağı, HI-TECH PICC 9.50 derleyici:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background: #f8f8f8; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;pre style="line-height: 125%; margin: 0;"&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class="”code”"&gt;
&lt;pre&gt;#include&amp;lt; pic.h&amp;gt;
__CONFIG(0x031D4);

void low_init()
{

CMCON=0x07;

ADCON1=0b00110000;
/*
|        -
||       - ADCS2
|||      - ADCS1
||||     - ADCS0
|||||    -
||||||   -
|||||||  -
|||||||| -
*/

ADCON0=0b10001101;
/*
|        - ADFM -
||       - VCFG -
|||
||||     - CHS2
|||||    - CHS1
||||||   - CHS0: выбор вывода для АЦП
|||||||  - GO/DONE
|||||||| - ADON
*/
ANS4 = 1;    //    3 - анаологовый

TRISA=0b00010000;
TRISC=0x00;
}

void delay(unsigned int p)
{
unsigned int i;
for(i=0;i

}

void seg7(int c,int s)
{
unsigned char t=0;
PORTA=0b00000000;
switch(s)
{
case 1 :{    t=1;}break;
case 2 :{    t=2;}break;
case 3 :{    t=32;}break;
}
switch(c%10)
{
case 0 : {PORTC=0b00000000;PORTA=t+4;}break;
case 1 : {PORTC=0b00011110;PORTA=t+4;}break;
case 2 : {PORTC=0b00010001;PORTA=t;}break;
case 3 : {PORTC=0b00010100;PORTA=t;}break;
case 4 : {PORTC=0b00001110;PORTA=t;}break;
case 5 : {PORTC=0b00100100;PORTA=t;}break;
case 6 : {PORTC=0b00100000;PORTA=t;}break;
case 7 : {PORTC=0b00010110;PORTA=t+4;}break;
case 8 : {PORTC=0b00000000;PORTA=t;}break;
case 9 : {PORTC=0b00000100;PORTA=t;}break;
}
}

void main()
{
int i,v,v1;
long int v2;
float vf;
low_init();
delay(10000);
while(1)
{
GODONE=1;        //    Устанавливаем бит GO для того что бы сделать опрос АЦП
for(i=0;i &amp;lt; 200;i++)
{
seg7(v1/10,1);
delay(5);
seg7(v1%10,2);
delay(5);
seg7(v2/10,3);
delay(5);
}
delay(100);
while(GODONE){}
v=ADRESL;            //    читаем младший байт с АЦП
i=ADRESH;            //    читаем старший байт с АЦП (а именно 2 байта с него)
v=v+i*256;            //    складываем младщий и старший байт с АЦП

v1=(v*10/241)%100;    //    преобразуем
vf=1000/241;
v2=(int)((float)v/241*1000)%100;
}
}&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class="”code”"&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeSlzgF-02oQsBjr7s89a4LnGtAme1QWbOSUHbKvrzojyyU30eu5VNkCrzY7qIkDeM5Fki0nwteCeAN8oZRzeVUik_sxoQJEDrf44Zi-xnqOiuzjkfXORVLojgld19571mZjjonbIzveM/s1600/AtD_PIC16F676_7seg_plate.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="283" data-original-width="354" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeSlzgF-02oQsBjr7s89a4LnGtAme1QWbOSUHbKvrzojyyU30eu5VNkCrzY7qIkDeM5Fki0nwteCeAN8oZRzeVUik_sxoQJEDrf44Zi-xnqOiuzjkfXORVLojgld19571mZjjonbIzveM/s400/AtD_PIC16F676_7seg_plate.gif" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Devre, ortak bir anodu olan kırmızı bir gösterge kullanır - BA56-12GWA.&lt;/span&gt;&lt;br /&gt;
&lt;span style="vertical-align: inherit;"&gt;&lt;span style="vertical-align: inherit;"&gt;Gösterge ve pimler hariç, karttaki tüm elemanlar rayların yan tarafında bulunur.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Dirençler R6-R12 çip 0805, direnç R1, geleneksel bir pakette 0.125W, diğer tüm parçalar 1206. Direnç R4, sol üst köşedeki iki büyük alana lehimlenmiş yerleşiktir.&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;Soket aşağıdaki gibi lehimlenir: fazla çıktıyı çıkarın, bacakları yanlara doğru bükün ve hafifçe kısaltın, daha sonra her şey kalaylanır ve lehimlenir, soket için tahtada delik açmak gerekmez;&amp;nbsp;&lt;/span&gt;&lt;span style="vertical-align: inherit;"&gt;kontrolör için, delikleri ve lehimi her zamanki gibi sadece rayların yanından delebilirsiniz.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Voltmetre, R4 direnci ayarlanarak ve bir bölücü (makalede bölücü 241) seçilerek ayarlanır.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Bu arşiv şunları içerir:&lt;/span&gt;&lt;/div&gt;
&lt;ul style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; list-style-image: url(&amp;quot;images/bullet.png&amp;quot;); margin: 0px 0px 0px 2em; padding: 0px;"&gt;
&lt;li&gt;&lt;span style="vertical-align: inherit;"&gt;Kaynak kodu&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="vertical-align: inherit;"&gt;firmware&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="vertical-align: inherit;"&gt;* .Lay formatında baskılı devre kartı&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;a href="https://yadi.sk/d/9uDlHirGsSGX8g" target="_blank"&gt;indir&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmMWZBo_N6IKXwOav-ir5Wg3I98MWtAtbSFqgl28rxNyQk7FTkxdV42vSRN36-kwUr5jxtTCn61Cn6SdvWZQ6RFGuCLsGSWbV2vxX7b8nZN5ax7OVgHZPola2ksSCTV9baP4M2oqKV0VQ/s1600/AtD_power_supply_01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="734" data-original-width="1024" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmMWZBo_N6IKXwOav-ir5Wg3I98MWtAtbSFqgl28rxNyQk7FTkxdV42vSRN36-kwUr5jxtTCn61Cn6SdvWZQ6RFGuCLsGSWbV2vxX7b8nZN5ax7OVgHZPola2ksSCTV9baP4M2oqKV0VQ/s400/AtD_power_supply_01.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: center;"&gt;
&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Bu voltmetre, güç kaynaklarından birine (daha kesin olarak harici bir dengeleyici) bir gösterge olarak monte edildi, bu makalede sadece voltmetrenin kendisi sunuldu, güç kaynağının bileşenleri çıkarıldı.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; line-height: 24px; text-align: right;"&gt;
&lt;span style="vertical-align: inherit;"&gt;Makale 16 Aralık 2010'da güncellendi.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong style="background-color: white; font-family: Verdana, &amp;quot;Trebuchet MS&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12.16px; text-align: center;"&gt;&lt;span style="vertical-align: inherit;"&gt;&lt;span style="color: red; vertical-align: inherit;"&gt;Vladimir'den makaleye ek&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidf1C5mKltxDBz56Vh9wpE6XamEh3I-lLJ5YnJcLWNtr0HRwUBhqIVnq7yqFcKq8SB5CDRN3wwI4549rrXf0VIGPMU2wXUKQDUXCdhu3V3uDU_T4ccyAT3_L7aoLlS3vXqxReln4yXvy4/s1600/AtD_Vladimir.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="402" data-original-width="732" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidf1C5mKltxDBz56Vh9wpE6XamEh3I-lLJ5YnJcLWNtr0HRwUBhqIVnq7yqFcKq8SB5CDRN3wwI4549rrXf0VIGPMU2wXUKQDUXCdhu3V3uDU_T4ccyAT3_L7aoLlS3vXqxReln4yXvy4/s400/AtD_Vladimir.gif" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://yadi.sk/d/JC38aBRPtp0CyQ" target="_blank"&gt;DIP14 ve SO14 için Tabelaları İndirin&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://yadi.sk/d/9uDlHirGsSGX8g"&gt;&lt;input type="submit" value="1 Download" /&gt;&lt;/a&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://yadi.sk/d/JC38aBRPtp0CyQ"&gt;&lt;input type="submit" value="2 Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjylwVULQVSaqlo1OUwYr64Lq4pf69i-U8i2XlBc3qHsRAOzy6WAcEYar-lI2qx2j6rc8fZa3QTxYvNuvtwAEvWC_r0YY9-qLQ71x3z1T2R12kAOT4uR-qcVCo-zpmDjrRSf4_Cds5qWtE/s72-c/AtD_PIC16F676_7seg_scheme.gif" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>OTOMATİK AKÜ ŞARJ DEVRESİ 1- 12V SEA-LEAD ACİD </title><link>https://kulogluelektronik.blogspot.com/2020/03/otomatik-aku-sarj-devresi-1-12v-sea.html</link><category>Devre</category><category>Kendin Yap</category><category>Şarj</category><pubDate>Mon, 9 Mar 2020 21:13:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-473502343247658924</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 17px; line-height: 31px; margin-bottom: 26px; overflow-wrap: break-word;"&gt;
Geçenlerde&amp;nbsp;&lt;strong style="box-sizing: border-box;"&gt;akü şarj devresi&lt;/strong&gt;&amp;nbsp;lazım oldu. Biraz araştırma sonunda birkaç tane&amp;nbsp;&lt;strong style="box-sizing: border-box;"&gt;akü şarj devresi&lt;/strong&gt;&amp;nbsp;buldum. Başkalarının da faydalanması için burada paylaşıyorum. Öncelikle belirteyim ki, bu konuda paylaştığım tüm devrelerin çalıştığı teyit edilmiştir.&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 17px; line-height: 31px; margin-bottom: 26px; overflow-wrap: break-word;"&gt;
Konunun sonunda aküler hakkında çok ayrıntılı bilgiler var. &amp;nbsp;Akülerin şarj edilmesi hakkında gereken bilgiye sahip değilseniz, &amp;nbsp;önce o dökümanı incelemenizi öneririm.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGrQPXZtqWPLyqGb840pxPmNYJdZH-z7AIH-Xf3KuLvFHSulWvTGfG_KSt9md3AVYAadibluR8skvVdvWq2FHwNnDaqprAe0HGO1I60vRG0PmpjfehWEzRYKlB_D966-SrxmfYhZgXmMw/s1600/1359831161-300x255.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="255" data-original-width="300" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGrQPXZtqWPLyqGb840pxPmNYJdZH-z7AIH-Xf3KuLvFHSulWvTGfG_KSt9md3AVYAadibluR8skvVdvWq2FHwNnDaqprAe0HGO1I60vRG0PmpjfehWEzRYKlB_D966-SrxmfYhZgXmMw/s400/1359831161-300x255.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigtdCpSwDnp-_NMUzqZRQi1Ibu9xAXxah7iRKQMnJLfj4KEXvyeuczRrqCEj3J2naHsufAdSZ094mhsJEJmxhdVdXBp9w610piM1ugN96E4ZUwYU1hRr2Eq-j_gR2iExx7rBRkVTeh-Og/s1600/aku-sarj-devresi-300x255.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="255" data-original-width="300" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigtdCpSwDnp-_NMUzqZRQi1Ibu9xAXxah7iRKQMnJLfj4KEXvyeuczRrqCEj3J2naHsufAdSZ094mhsJEJmxhdVdXBp9w610piM1ugN96E4ZUwYU1hRr2Eq-j_gR2iExx7rBRkVTeh-Og/s400/aku-sarj-devresi-300x255.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; box-sizing: border-box; color: #222222; font-family: &amp;quot;Open Sans&amp;quot;; font-size: 17px; line-height: 31px; margin-bottom: 26px; overflow-wrap: break-word;"&gt;
&lt;br /&gt;&lt;/div&gt;
BİR ÇOK KİŞİNİN İŞİNE YARAYACAĞINI DÜŞÜNDÜĞÜM SEA LEAD ACİD (KURU AKÜ) DEDİKLERİ ”BANA GÖRE HİÇBİR AKÜ KURU OLAMAZ” AKÜLER İÇİN ŞARJ DEVRESİDİR.ŞARJ İŞLEMİ BİTTİĞİNDE AKIMI OTOMATİK KESER.MALİYETİ UCUZ EN FAZLA 5-6 TLYE MAL OLUYOR DEVRE TİCARİ KULLANILAN HAZIR KİTİ 20TL GİBİ FİYATA SATILAN DEVREDİR.NETTE KISA BİR ARAŞTIRMADA BENZER DEVRELER GÖRÜRSÜNÜZ.DEVRENİN PCB’SİNİ KENDİM ÇİZDİM ŞEMATİĞİNİ ASİS TE SİMÜLE ETTİM HİÇ BİR SORUNU YOK ZATEN KENDİM KULLANIYORUM.DEVRE BU HALİYLE 12V 7AH AKÜLER İÇİN 650 İLE 700 MA AKIM VERİYOR.&lt;br /&gt;
&lt;br /&gt;
GÖNÜL RAHATLIĞI İLE YAPABİLİRSİNİZ.DEVRE İLE İLGİLİ HERŞER DOSYADA MEVCUTTUR.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not: Devreye en fazla 40volt dc gelime kadar besleyiniz,kalibrasyon olayına gelince devreye enerji verdikten sonra tripot&amp;nbsp; ile şarj voltajını ayarlayın ve daha sonra akü bağlantılarını yapınız.Bağlantı yapıldığında sarı led yanarak şarj işlemi başlamış olacaktır,ben 12v 7ah aküyü yaklaşık 10-12 saat gibi sürede şarj ettim.Şarj işlemi bittikten sonra led yavaş yavaş sönecektir tamamen söndüğünde şarj tamam demektir.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtqg59TopioGld3qioCQotSezI0Wsuzsz9F97b6HMJtbJJkhLGQgA8QuCV1Ukxu5D18VVvW5dVFO2hWNygT9crZBhU2kMhY42dq16q41zVEICzKEvg36eqMA_PBia1PDzq0iXmetgVe_s/s1600/qr.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="145" data-original-width="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtqg59TopioGld3qioCQotSezI0Wsuzsz9F97b6HMJtbJJkhLGQgA8QuCV1Ukxu5D18VVvW5dVFO2hWNygT9crZBhU2kMhY42dq16q41zVEICzKEvg36eqMA_PBia1PDzq0iXmetgVe_s/s1600/qr.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://yadi.sk/d/biJ44zF2crhK9A"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGrQPXZtqWPLyqGb840pxPmNYJdZH-z7AIH-Xf3KuLvFHSulWvTGfG_KSt9md3AVYAadibluR8skvVdvWq2FHwNnDaqprAe0HGO1I60vRG0PmpjfehWEzRYKlB_D966-SrxmfYhZgXmMw/s72-c/1359831161-300x255.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Alarm Clock with Arduino</title><link>https://kulogluelektronik.blogspot.com/2020/03/alarm-clock-with-arduino.html</link><category>Arduino</category><pubDate>Mon, 9 Mar 2020 21:08:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-2031462037533210014</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoO-fkvdn6jU__Yt3H4h4bFP3AcXpWvs2hSI2a4lDvHCOehGi9DDZaCsaN5iauHk8aAo4LeKKs2NCUQYace2fq7T2jdbYcZ4RZRndmB8msf3yDCfxQHw9YcEIS65gtAo0s2MU27NelJDU/s1600/alarmclock_-_copia_NumDADgiNd.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="675" data-original-width="900" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoO-fkvdn6jU__Yt3H4h4bFP3AcXpWvs2hSI2a4lDvHCOehGi9DDZaCsaN5iauHk8aAo4LeKKs2NCUQYace2fq7T2jdbYcZ4RZRndmB8msf3yDCfxQHw9YcEIS65gtAo0s2MU27NelJDU/s400/alarmclock_-_copia_NumDADgiNd.jpg" width="400" /&gt;&lt;/a&gt;&lt;span style="color: red;"&gt;ABOUT THIS PROJECT&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
After designing the "Clock Set Date Time" and hearing the suggestion of ArduPic, I thought it would be a good idea and also useful, add a "wake-up alarm." A small change to the code and adding a few components: Here's "the Alarm Clock".&lt;br /&gt;
&lt;br /&gt;
Compared to the previous project, I added a buzzer Piezzo, a diode LED, a resistor of 220 ohms, a button and as said before, I listened to the suggestion of "ArduPic" and I removed the resistance to "pull down."&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: white; font-family: &amp;quot;typonine sans medium&amp;quot;; font-size: 20px; letter-spacing: 0.6px; text-transform: uppercase;"&gt;&lt;span style="color: red;"&gt;COMPONENTS AND SUPPLIES&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
Arduino UNO &amp;amp; Genuino UNO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;×&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Real Time Clock (RTC)&lt;br /&gt;
DS1307 or DS3231&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;×&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
LCD - 16x2 White on Blue&lt;br /&gt;
Display LCD 20 x04 with I2C module&amp;nbsp; &amp;nbsp; ×&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
Omron b3f 1000 image 75px&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
SparkFun Pushbutton switch 12mm&lt;br /&gt;
×&lt;span style="white-space: pre;"&gt; &lt;/span&gt;4&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
09590 01&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
LED (generic)&lt;br /&gt;
×&lt;span style="white-space: pre;"&gt; &lt;/span&gt;1&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
Mfr 25fbf52 221r sml&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
Resistor 221 ohm&lt;br /&gt;
×&lt;span style="white-space: pre;"&gt; &lt;/span&gt;1&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
Adafruit industries ada1536 image&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
Buzzer×&lt;span style="white-space: pre;"&gt; &lt;/span&gt;1&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
11026 02&lt;span style="white-space: pre;"&gt; &lt;/span&gt;Jumper wires (generic)×&lt;span style="white-space: pre;"&gt; &lt;/span&gt;1&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: red;"&gt;Arduino Code&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;
To remove the "pull down" resistances I had to make a change to the code.&lt;br /&gt;
&lt;br /&gt;
Use the pullup resistors of arduino, and reverse the code logic conditions.&lt;br /&gt;
&lt;br /&gt;
pinMode(P1,INPUT_PULLUP);&lt;br /&gt;
pinMode(P2,INPUT_PULLUP);&lt;br /&gt;
pinMode(P3,INPUT_PULLUP);&lt;br /&gt;
pinMode(P4,INPUT_PULLUP);&lt;br /&gt;
if(digitalRead(P1)==LOW)&lt;br /&gt;
{&lt;br /&gt;
menu=menu+1;&lt;br /&gt;
Alarm Code&lt;br /&gt;
The activation and deactivation of the alarm clock is controlled by the "P4" button, line 444 "void Alarm()".&lt;br /&gt;
&lt;br /&gt;
To enter the alarm settings, you must use the "P3" "P2" buttons together, line 81:&lt;br /&gt;
&lt;br /&gt;
if((digitalRead(P2)== LOW)&amp;amp;&amp;amp;(digitalRead(P3)== LOW))&lt;br /&gt;
When the alarm is not set, the bottom of the display will show "Alarm Off" when the alarm is active, it shows the time that has been set. At the scheduled time, the display flashes, the LED lights up, and the buzzer sounds two tones.&lt;br /&gt;
&lt;br /&gt;
To turn off the alarm, you have to act on the P4 button, or, after a minute, it turns off alone. I am attaching the electric schematic and the layout Fritzing.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: white; font-family: &amp;quot;typonine sans medium&amp;quot;; font-size: 20px; letter-spacing: 0.6px; text-transform: uppercase;"&gt;&lt;span style="color: red;"&gt;SCHEMATICS&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; font-family: &amp;quot;typonine sans medium&amp;quot;; font-size: 20px; letter-spacing: 0.6px; text-transform: uppercase;"&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="background-color: white; font-family: &amp;quot;typonine sans medium&amp;quot;; font-size: 20px; letter-spacing: 0.6px; text-transform: uppercase;"&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="background-color: white; font-family: &amp;quot;typonine sans medium&amp;quot;; font-size: 20px; letter-spacing: 0.6px; text-transform: uppercase;"&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8JlJaVzIMvrKP5TPawXlIyoC5h6z5ZNwy7OEKlXXQRgwvLJpHIQs01-040gnCXwngdDEQFlYlx0gHq1SeIRnUdsTVnuuU9LJahvGHbXpUX3EQ_lSbtQ-FI3Kn-kF5VCTxZK4IsbTJx6M/s1600/alarm_clock_5KZ82y7hnm.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1133" data-original-width="1600" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8JlJaVzIMvrKP5TPawXlIyoC5h6z5ZNwy7OEKlXXQRgwvLJpHIQs01-040gnCXwngdDEQFlYlx0gHq1SeIRnUdsTVnuuU9LJahvGHbXpUX3EQ_lSbtQ-FI3Kn-kF5VCTxZK4IsbTJx6M/s400/alarm_clock_5KZ82y7hnm.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="background-color: white; font-family: &amp;quot;typonine sans medium&amp;quot;; font-size: 20px; letter-spacing: 0.6px; text-transform: uppercase;"&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="background-color: white; font-family: &amp;quot;typonine sans medium&amp;quot;; font-size: 20px; letter-spacing: 0.6px; text-transform: uppercase;"&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu3B42R62ZdqaW3uv2LYYirKF_C02bxo2IEy0eQnyrGOll9Sz3Rk8M32r1yiIrA04eoLRXD39g97YHTEli6lOvPuWADLvA0ftSQ7Fq8scWOouM40re8gGSODxpMgD88_kLMb5VEjllmpg/s1600/allarm_clock_bb_cfGmNpJ5c9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1600" data-original-width="1443" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu3B42R62ZdqaW3uv2LYYirKF_C02bxo2IEy0eQnyrGOll9Sz3Rk8M32r1yiIrA04eoLRXD39g97YHTEli6lOvPuWADLvA0ftSQ7Fq8scWOouM40re8gGSODxpMgD88_kLMb5VEjllmpg/s400/allarm_clock_bb_cfGmNpJ5c9.jpg" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="background-color: white; font-family: &amp;quot;typonine sans medium&amp;quot;; font-size: 20px; letter-spacing: 0.6px; text-transform: uppercase;"&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="color: red;"&gt;CODE&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://yadi.sk/d/cQbM3pbXbFviGw"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoO-fkvdn6jU__Yt3H4h4bFP3AcXpWvs2hSI2a4lDvHCOehGi9DDZaCsaN5iauHk8aAo4LeKKs2NCUQYace2fq7T2jdbYcZ4RZRndmB8msf3yDCfxQHw9YcEIS65gtAo0s2MU27NelJDU/s72-c/alarmclock_-_copia_NumDADgiNd.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title> DC CONVERTER CIRCUIT 9V TO 13.8V LM2577</title><link>https://kulogluelektronik.blogspot.com/2020/03/dc-converter-circuit-9v-to-138v-lm2577.html</link><category>Devre</category><category>Voltaj</category><pubDate>Mon, 9 Mar 2020 11:11:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-6341698906381649788</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
A search 9v to 12v converter circuit requester had a person which article do not remember was a bit late but certainly someone that would work for a circuit dc-dc converter circuit’s input voltage 9 … 13.8v between the output 13.8 volts (12 .12 v adjustable) 13.8 volt output with 1.68 amps can give&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnUyx0rIlWf4ppFgEa4MTKU-Mwp9qSjuEJHbyTODCjOebjhRI85nSiffGEBaaaIQPEHMzOrBRi3SpLldnYhiayiKrGRb5Y3wG-G2D2UkwFnft42goUmD4DooeXOnBoz8b2U8d5gAqjK0/s1600/lm2577-9v-to-13v-production-boost-converter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" data-original-height="449" data-original-width="990" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnUyx0rIlWf4ppFgEa4MTKU-Mwp9qSjuEJHbyTODCjOebjhRI85nSiffGEBaaaIQPEHMzOrBRi3SpLldnYhiayiKrGRb5Y3wG-G2D2UkwFnft42goUmD4DooeXOnBoz8b2U8d5gAqjK0/s400/lm2577-9v-to-13v-production-boost-converter.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Used coil value 125uh 2 pc power supply in the output filter coil core on the winding can be done also on the source site introduction to the filter if added, better results are said to be the filter coil de pc power supply 220 volts input and can be found in&lt;br /&gt;
&lt;br /&gt;
9V to 13.8V the boost converter I tried to make a boost converter using the LM2577 Series of various step-down, step-up is out, the IC is an IC for power supply.&lt;br /&gt;
&lt;br /&gt;
Function is a monolithic integrated circuit step-up (boost), flyback, and a built-in all of the power / control function of forward converter switching regulators. There is a variable output voltage of ADJ version and fixed output voltage version, 12V, 15V of the this device. I am using as a variable type fixed output this time. This is because when you set the output value by mistake, it is not to overpower.&lt;br /&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style="color: red;"&gt;LM2577 9V TO 13.8V BOOST CONVERTER&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1_RZaZ46crX7b31SJoG4i0EskIfdt1hIYbHrSNpMghHHQXt9M7VeX_kXTogSeuLIPGT46wiH887FFKFS8WCDUMFQgIINuKAx-RUNolpihZoEw21xGDsmaj1JNzdCJuqlHMBgnYzyiFec/s1600/guc-filtresi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="468" data-original-width="402" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1_RZaZ46crX7b31SJoG4i0EskIfdt1hIYbHrSNpMghHHQXt9M7VeX_kXTogSeuLIPGT46wiH887FFKFS8WCDUMFQgIINuKAx-RUNolpihZoEw21xGDsmaj1JNzdCJuqlHMBgnYzyiFec/s400/guc-filtresi.png" width="342" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But is an experimental result, Input voltage: 9V ~ 13.8V (Variation value is 0.2V or less), output current 13.8V:: 1.5A output voltage within Board size: 40mm (w) × 40mm (d) × 25mm (h)&lt;br /&gt;
&lt;br /&gt;
I think that even if the use of lead-acid batteries, nickel-cadmium battery, lithium-ion battery or the like, so you get any output of 13.8V in a stable, convenient to move operation. The input voltage is changed, stable output voltage, so obtained, the battery even if the voltage drop, the output voltage is kept constant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://www.blogger.com/u/1/................"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnUyx0rIlWf4ppFgEa4MTKU-Mwp9qSjuEJHbyTODCjOebjhRI85nSiffGEBaaaIQPEHMzOrBRi3SpLldnYhiayiKrGRb5Y3wG-G2D2UkwFnft42goUmD4DooeXOnBoz8b2U8d5gAqjK0/s72-c/lm2577-9v-to-13v-production-boost-converter.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>LED şeritler için mosfet ile yüksek güç çıkışı</title><link>https://kulogluelektronik.blogspot.com/2020/03/led-seritler-icin-mosfet-ile-yuksek-guc.html</link><category>Devre</category><category>Kendin Yap</category><pubDate>Mon, 9 Mar 2020 10:04:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-1229494497994464959</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: Lato, Roboto, Helvetica, &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 16px; vertical-align: inherit;"&gt;Bu küçük devre, mikrodenetleyici (Arduino gibi) tek renkli LED şerit veya 12V'luk herhangi bir güç yükünü (motorlar veya lambalar) kontrol etmeyi sağlar.&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: Lato, Roboto, Helvetica, &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 16px; vertical-align: inherit;"&gt;BC548 transistörü kontrol sinyalini güçlendirir, böylece mosfet'in KAPISI'nda tam doygunluğa getirmek için yeterli voltaj vardır.&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: Lato, Roboto, Helvetica, &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 16px; vertical-align: inherit;"&gt;Bu nedenle devre, çok çeşitli kontrol voltajlarıyla (1.8V, 3.3V veya 5V) çalışır ve düşük voltajlı GATE (mantık seviyesi mosfet) özel mosfet kullanmak gerekli değildir.&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: Lato, Roboto, Helvetica, &amp;quot;Helvetica Neue&amp;quot;, Arial, sans-serif; font-size: 16px; vertical-align: inherit;"&gt;Çıkış akımı yüksekse, mosfet için bir soğutucu monte etmek gerekecektir.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcEpqxq8wXV3bhaLWqFamsgchAlT3hGYujAnpRzA3s1QZ7EPQ9ZVENx_n_MvgWxEb3An58uGFAipArif7VfVAtmqYwxvccWIw6c6OKkuaEJj_1uIfhUFzNYkFOcEadkFRkpIB6veoMKik/s1600/salida_mosfet_leds.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="264" data-original-width="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcEpqxq8wXV3bhaLWqFamsgchAlT3hGYujAnpRzA3s1QZ7EPQ9ZVENx_n_MvgWxEb3An58uGFAipArif7VfVAtmqYwxvccWIw6c6OKkuaEJj_1uIfhUFzNYkFOcEadkFRkpIB6veoMKik/s1600/salida_mosfet_leds.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcEpqxq8wXV3bhaLWqFamsgchAlT3hGYujAnpRzA3s1QZ7EPQ9ZVENx_n_MvgWxEb3An58uGFAipArif7VfVAtmqYwxvccWIw6c6OKkuaEJj_1uIfhUFzNYkFOcEadkFRkpIB6veoMKik/s1600/salida_mosfet_leds.png"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcEpqxq8wXV3bhaLWqFamsgchAlT3hGYujAnpRzA3s1QZ7EPQ9ZVENx_n_MvgWxEb3An58uGFAipArif7VfVAtmqYwxvccWIw6c6OKkuaEJj_1uIfhUFzNYkFOcEadkFRkpIB6veoMKik/s72-c/salida_mosfet_leds.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>LM386 ile 1/2 Watt ses mini amplifikatör</title><link>https://kulogluelektronik.blogspot.com/2020/03/lm386-ile-12-watt-ses-mini-amplifikator.html</link><category>Devre</category><category>Kendin Yap</category><category>LM 386</category><pubDate>Mon, 9 Mar 2020 10:00:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-3793057889610073434</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: &amp;quot;lato&amp;quot; , &amp;quot;roboto&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 12pt; line-height: 12pt;"&gt;&lt;span style="box-sizing: border-box; vertical-align: inherit;"&gt;&lt;span style="box-sizing: border-box; vertical-align: inherit;"&gt;LM386, çalışması için çok az harici bileşene ihtiyaç duyan küçük ve pratik bir entegre 8 bacaklı amplifikatördür.&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; vertical-align: inherit;"&gt;Gösterdiğim devre, 20 kazanım ve 1/2 Watt'lık bir güçle “aslında anında” bir test amplifikatörü monte etmemize izin veriyor (aslında besleme voltajı ve hoparlör empedansı).&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; vertical-align: inherit;"&gt;Devre mono, stereo versiyonu için sadece bir ama çift olması gereken potansiyometre hariç iki kişilik her şeyi oynamanız gerekiyor.&amp;nbsp;&lt;/span&gt;&lt;span style="box-sizing: border-box; vertical-align: inherit;"&gt;Uğultuyu önlemek için, iyi filtrelenmiş bir güç kaynağı ile beslemenizi tavsiye ederim.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: &amp;quot;lato&amp;quot; , &amp;quot;roboto&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 12pt; line-height: 12pt;"&gt;&lt;span style="box-sizing: border-box; vertical-align: inherit;"&gt;&lt;span style="box-sizing: border-box; vertical-align: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd_BkM8CJXIYC1-i3tt_BMD70jXU6U-RRYc7OryAREDqOGLjtzD0IGmEElE4_Dtxk3PhzMqT2QMaq1fEswFnQG5vDgN1ZV1yBvnUe18MvLUeuhELcPYFjlVzeqkrhQeqXXUlzv_xd9w40/s1600/amplificador_lm386.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="303" data-original-width="451" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd_BkM8CJXIYC1-i3tt_BMD70jXU6U-RRYc7OryAREDqOGLjtzD0IGmEElE4_Dtxk3PhzMqT2QMaq1fEswFnQG5vDgN1ZV1yBvnUe18MvLUeuhELcPYFjlVzeqkrhQeqXXUlzv_xd9w40/s1600/amplificador_lm386.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd_BkM8CJXIYC1-i3tt_BMD70jXU6U-RRYc7OryAREDqOGLjtzD0IGmEElE4_Dtxk3PhzMqT2QMaq1fEswFnQG5vDgN1ZV1yBvnUe18MvLUeuhELcPYFjlVzeqkrhQeqXXUlzv_xd9w40/s1600/amplificador_lm386.png"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd_BkM8CJXIYC1-i3tt_BMD70jXU6U-RRYc7OryAREDqOGLjtzD0IGmEElE4_Dtxk3PhzMqT2QMaq1fEswFnQG5vDgN1ZV1yBvnUe18MvLUeuhELcPYFjlVzeqkrhQeqXXUlzv_xd9w40/s72-c/amplificador_lm386.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item><item><title>Regulador de tensión variable para alimentación con el LM317</title><link>https://kulogluelektronik.blogspot.com/2020/03/regulador-de-tension-variable-para.html</link><category>Devre</category><category>Kendin Yap</category><pubDate>Mon, 9 Mar 2020 09:58:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-2505821077210161474.post-1546330406992332353</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: &amp;quot;lato&amp;quot; , &amp;quot;roboto&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; vertical-align: inherit;"&gt;Bu tasarım bize LM317 kullanan küçük bir değişken voltaj regülatörünün nasıl oluşturulacağını gösterir.&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: &amp;quot;lato&amp;quot; , &amp;quot;roboto&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; vertical-align: inherit;"&gt;Çıkış voltajı potansiyometre ile 1.25V ila 28V arasında düzenlenirken giriş voltajı 5V ile 30V arasında olabilir (ikinci voltaj aynı zamanda giriş voltajına da bağlı olacaktır).&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: &amp;quot;lato&amp;quot; , &amp;quot;roboto&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; vertical-align: inherit;"&gt;Kapasitörler gerekli değildir, ancak her zaman gürültüleri filtrelemek ve regülatörün kendiliğinden salınım olaylarını önlemek için kullanırım.&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: &amp;quot;lato&amp;quot; , &amp;quot;roboto&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; vertical-align: inherit;"&gt;Çıkış akımına ve giriş ve çıkış arasındaki voltaj farkına bağlı olarak, LM317 için bir soğutucu kullanılması gerekeceğini unutmayın.&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcXqYAa9l_qbnFvUdfYAXG4-ZTBNF7RuufBBLpJjLkDodYc6lRbYLZLRQPRthXy4jF0w-jgRsBA88bobD5k3w5rnKN1HQcIXimJsJ6IcbJGDdAjkB_GCPk6QKsTTat7x1phHdE-dCk8IY/s1600/regulador_lm317.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="241" data-original-width="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcXqYAa9l_qbnFvUdfYAXG4-ZTBNF7RuufBBLpJjLkDodYc6lRbYLZLRQPRthXy4jF0w-jgRsBA88bobD5k3w5rnKN1HQcIXimJsJ6IcbJGDdAjkB_GCPk6QKsTTat7x1phHdE-dCk8IY/s1600/regulador_lm317.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="background-color: white; box-sizing: border-box; color: #575757; font-family: &amp;quot;lato&amp;quot; , &amp;quot;roboto&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px; vertical-align: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcXqYAa9l_qbnFvUdfYAXG4-ZTBNF7RuufBBLpJjLkDodYc6lRbYLZLRQPRthXy4jF0w-jgRsBA88bobD5k3w5rnKN1HQcIXimJsJ6IcbJGDdAjkB_GCPk6QKsTTat7x1phHdE-dCk8IY/s1600/regulador_lm317.png"&gt;&lt;input type="submit" value="Download" /&gt;&lt;/a&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcXqYAa9l_qbnFvUdfYAXG4-ZTBNF7RuufBBLpJjLkDodYc6lRbYLZLRQPRthXy4jF0w-jgRsBA88bobD5k3w5rnKN1HQcIXimJsJ6IcbJGDdAjkB_GCPk6QKsTTat7x1phHdE-dCk8IY/s72-c/regulador_lm317.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>kulogluelektronik@gmail.com (KulogluElectronic)</author></item></channel></rss>