<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5848748962449588903</id><updated>2026-10-11T20:42:23.048+01:00</updated><category term="Tracker Solar arduino project Ppantilt servo control ldr"/><title type='text'>Electronic Piece</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-3085249707619101544</id><published>2019-06-12T00:58:00.001+01:00</published><updated>2019-06-12T01:05:44.589+01:00</updated><title type='text'>Mac a liar XD</title><content type='html'>&lt;a href=&quot;https://www.youtube.com/watch?v=947op8yKJRY&quot;&gt;https://www.youtube.com/watch?v=947op8yKJRY&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/3085249707619101544/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2019/06/mac-liar-xd.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3085249707619101544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3085249707619101544'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2019/06/mac-liar-xd.html' title='Mac a liar XD'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-3572754192102379119</id><published>2015-05-17T23:28:00.006+01:00</published><updated>2018-03-14T23:34:19.364+00:00</updated><title type='text'>Fedora 21 - reset root Password</title><content type='html'>[Experimental Post] &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Quick tutorial to show how to reset root Password in Fedora 21:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1.&lt;/b&gt; Open terminal;&lt;br /&gt;
&lt;b&gt;2. &lt;/b&gt;Run the command: &#39;sudo -i&#39;;&lt;br /&gt;
&lt;b&gt;3.&lt;/b&gt; Enter the password of your current account;&lt;br /&gt;
&lt;b&gt;4.&lt;/b&gt; Type &#39;passwd&#39;;&lt;br /&gt;
&lt;b&gt;5.&lt;/b&gt; System will ask for the new root password;&lt;br /&gt;
&lt;b&gt;6.&lt;/b&gt; After typing and confirming the new password run &#39;exit&#39; command 2 times;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/3572754192102379119/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2015/05/fedora-21-reset-root-password.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3572754192102379119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3572754192102379119'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2015/05/fedora-21-reset-root-password.html' title='Fedora 21 - reset root Password'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-6620616437229307197</id><published>2013-06-07T04:18:00.001+01:00</published><updated>2013-06-07T04:18:56.546+01:00</updated><title type='text'>Crontrolar Servo com arduino</title><content type='html'>Boas pessoal! Venho trazer - vos um pequeno tuturial de como controlar um servo através da porta serial do arduino.&lt;br /&gt;
Abaixo deixo o material utilizado no projeto, assim como algumas imagens e ainda um video deste em funcionamento, assim como o código para o arduino.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Imagens:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx-pc713m15Bu6aZP9t3Mn5NWkWLwL0TzNXum1o4D8ytQTeDE3Zz1hpr8lXKVX4mzh6xxjsa8WpgawYZiV40FFTNn-NG7j9UmGfivTdJukZauq7Ld7QRT83Jsn5kgZX2-khyl6GS4iI0iW/s1600/IMG_2070.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx-pc713m15Bu6aZP9t3Mn5NWkWLwL0TzNXum1o4D8ytQTeDE3Zz1hpr8lXKVX4mzh6xxjsa8WpgawYZiV40FFTNn-NG7j9UmGfivTdJukZauq7Ld7QRT83Jsn5kgZX2-khyl6GS4iI0iW/s320/IMG_2070.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrl8Bzs3Nk8aHAfJPTYjoFi1rE4jftbEdD5PLaW1qRXTbC2w1khh1kptA0lK7kk6M5mSAkuaaiKZneVHMZj1WNOrUkPOAmMgdjVZXOYUo_-D_MNXADvWgr8B_j23zwUj2LMIEx9xjbxkbn/s1600/IMG_2072.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrl8Bzs3Nk8aHAfJPTYjoFi1rE4jftbEdD5PLaW1qRXTbC2w1khh1kptA0lK7kk6M5mSAkuaaiKZneVHMZj1WNOrUkPOAmMgdjVZXOYUo_-D_MNXADvWgr8B_j23zwUj2LMIEx9xjbxkbn/s320/IMG_2072.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixNiEXYDmzNAcLpM1b2JnpMgVGizppAEIkqk0PSgflsC9PckDGxLeNv_5HVmlzjcCaM3sBGgVsyt5OA9mfi8uEsbI8-ufI2wPRFTgSiIVRkb5pFTQHphNUjxrS7DC9pn8NQQkpKLBnirKH/s1600/fig3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixNiEXYDmzNAcLpM1b2JnpMgVGizppAEIkqk0PSgflsC9PckDGxLeNv_5HVmlzjcCaM3sBGgVsyt5OA9mfi8uEsbI8-ufI2wPRFTgSiIVRkb5pFTQHphNUjxrS7DC9pn8NQQkpKLBnirKH/s320/fig3.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Vídeo:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/-EcAHp6-oig?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Código Arduino:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#include&amp;nbsp;&amp;lt;&lt;span style=&quot;color: #cc6600;&quot;&gt;Servo&lt;/span&gt;.h&amp;gt; 
&lt;span style=&quot;color: #cc6600;&quot;&gt;Servo&lt;/span&gt; myservo;
&lt;span style=&quot;color: #cc6600;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;setup&lt;/b&gt;&lt;/span&gt;() 
{&amp;nbsp;
&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;Serial&lt;/b&gt;&lt;/span&gt;.&lt;span style=&quot;color: #cc6600;&quot;&gt;begin&lt;/span&gt;(9600);
&amp;nbsp;&amp;nbsp;myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;attach&lt;/span&gt;(9);
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(0);  
}&amp;nbsp;
&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;loop&lt;/b&gt;&lt;/span&gt;()
{&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;int&lt;/span&gt; x=0;
&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;Serial&lt;/b&gt;&lt;/span&gt;.&lt;span style=&quot;color: #cc6600;&quot;&gt;available&lt;/span&gt;()&amp;gt;0)
{
&amp;nbsp;x=&lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;Serial&lt;/b&gt;&lt;/span&gt;.&lt;span style=&quot;color: #cc6600;&quot;&gt;read&lt;/span&gt; ();
}

&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;i&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(360);
}
&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;h&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(315);
}

&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;g&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(270);
}
&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;f&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(225);
}
&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;e&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(180);
}
&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;d&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(135);
}
&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;c&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(90);
}
&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;b&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(45);
}
&lt;span style=&quot;color: #cc6600;&quot;&gt;if&lt;/span&gt; (x==&lt;span style=&quot;color: #006699;&quot;&gt;&#39;a&#39;&lt;/span&gt;)
{
myservo.&lt;span style=&quot;color: #cc6600;&quot;&gt;write&lt;/span&gt;(0);
}
}&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Obrigado pela visita, fiquem bem.&lt;/pre&gt;
&lt;pre&gt;Cumprimentos Rui Marinho!&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/6620616437229307197/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2013/06/crontrolar-servo-com-arduino.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/6620616437229307197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/6620616437229307197'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2013/06/crontrolar-servo-com-arduino.html' title='Crontrolar Servo com arduino'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx-pc713m15Bu6aZP9t3Mn5NWkWLwL0TzNXum1o4D8ytQTeDE3Zz1hpr8lXKVX4mzh6xxjsa8WpgawYZiV40FFTNn-NG7j9UmGfivTdJukZauq7Ld7QRT83Jsn5kgZX2-khyl6GS4iI0iW/s72-c/IMG_2070.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-3054514655453951847</id><published>2013-06-07T04:01:00.000+01:00</published><updated>2013-06-07T04:01:13.303+01:00</updated><title type='text'>Carro Autónomo (Parte 2) - Projeto Arduino</title><content type='html'>Boas finalmente trago a 2ª parte do projeto &amp;nbsp;do carrinho autónomo, até aqui, desenvolvi um interface em vb.net, pelo qual é possível controlar o carrinho, bem mas nada melhor que ver o video para perceber.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Imagens:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxBt3qz4Al_N2TGTFlvHLeUYGoZau0Fqn3ymr3WzNbohcRgN6lleWvaAxSnlFacKa3okWMrjNfg2ddJjtOxhfopCK5c-r5b7zJpZ2zF0eTT9LI6sZ3Zw_u6osaEshODtpRABQ-RahgSZ58/s1600/Capturar.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxBt3qz4Al_N2TGTFlvHLeUYGoZau0Fqn3ymr3WzNbohcRgN6lleWvaAxSnlFacKa3okWMrjNfg2ddJjtOxhfopCK5c-r5b7zJpZ2zF0eTT9LI6sZ3Zw_u6osaEshODtpRABQ-RahgSZ58/s320/Capturar.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
*Interface Gráfico&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXD3QOoYBJ-MqC3xBSAv7FQ4TzPkWYmf-oWP-FycDDGggzfjh7MifGh6dLMiwii8l48tDu7VkcFZffut_SIvwRgtfvvddJxSsKMIEnvjo0OKeLyySTdDIoEPsFGzOb1QJrSyloOG5MjE0Y/s1600/fig4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXD3QOoYBJ-MqC3xBSAv7FQ4TzPkWYmf-oWP-FycDDGggzfjh7MifGh6dLMiwii8l48tDu7VkcFZffut_SIvwRgtfvvddJxSsKMIEnvjo0OKeLyySTdDIoEPsFGzOb1QJrSyloOG5MjE0Y/s320/fig4.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
*Circuito&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP-i_-R1DqtAnShTBtHLQzYv72kvv1TfEkSXFpCkZC3ZuaWlZoY972UwERuaGijBc_-UJTH4GLCgSrsO6UC8XbSUi4HGe_z7NUB9UDIjF2TTxfuL5aENrOq08V7dp__qMVd0yjOQB6HUxa/s1600/fig6.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP-i_-R1DqtAnShTBtHLQzYv72kvv1TfEkSXFpCkZC3ZuaWlZoY972UwERuaGijBc_-UJTH4GLCgSrsO6UC8XbSUi4HGe_z7NUB9UDIjF2TTxfuL5aENrOq08V7dp__qMVd0yjOQB6HUxa/s320/fig6.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEmJscq9R9PMYA6qcIczY-gzbmlfIs1R3G4AcVki-n3Sz-J3z1UnbCMEV-d8QByzZmQ7ERMMmj1IQgqHGWQy7Jg9o2BZbjd6rMp6CT2bRpfP23s4Lowhf8X0t5gu7A1XLrR0duAIbiBr5-/s1600/circuito+carro+auto.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEmJscq9R9PMYA6qcIczY-gzbmlfIs1R3G4AcVki-n3Sz-J3z1UnbCMEV-d8QByzZmQ7ERMMmj1IQgqHGWQy7Jg9o2BZbjd6rMp6CT2bRpfP23s4Lowhf8X0t5gu7A1XLrR0duAIbiBr5-/s320/circuito+carro+auto.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Esquema desenvolvido em Fritzing&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Vídeo&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/80VyWMKl-TY?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Código Arduino :&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;int x=0;&lt;br /&gt;
if (Serial.available()&amp;gt;0)&lt;br /&gt;
{&lt;br /&gt;
x=Serial.read ();&lt;br /&gt;
}&lt;br /&gt;
//frente&lt;br /&gt;
if (x==&#39;a&#39;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; digitalWrite(12,0); //Motor1&lt;br /&gt;
digitalWrite(11,1); //Motor 1&lt;br /&gt;
analogWrite(10,254); //Motor 1 PWM&lt;br /&gt;
&amp;nbsp;digitalWrite(8,0); //Motor 2&lt;br /&gt;
digitalWrite(7,0); //Motor 2&lt;br /&gt;
analogWrite(9,0); //Motor 2 PWM&lt;br /&gt;
}&lt;br /&gt;
//tras&lt;br /&gt;
if (x==&#39;b&#39;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; digitalWrite(12,1); //Motor1&lt;br /&gt;
digitalWrite(11,0); //Motor 1&lt;br /&gt;
analogWrite(10,254); //Motor 1 PWM&lt;br /&gt;
&amp;nbsp;digitalWrite(8,0); //Motor 2&lt;br /&gt;
digitalWrite(7,0); //Motor 2&lt;br /&gt;
analogWrite(9,0); //Motor 2 PWM&lt;br /&gt;
}&lt;br /&gt;
//para&lt;br /&gt;
if (x==&#39;c&#39;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; digitalWrite(12,0); //Motor1&lt;br /&gt;
digitalWrite(11,0); //Motor 1&lt;br /&gt;
analogWrite(10,0); //Motor 1 PWM&lt;br /&gt;
&amp;nbsp;digitalWrite(8,0); //Motor 2&lt;br /&gt;
digitalWrite(7,0); //Motor 2&lt;br /&gt;
analogWrite(9,0); //Motor 2 PWM&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//direita&lt;br /&gt;
if (x==&#39;d&#39;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(8,0); //Motor2&lt;br /&gt;
digitalWrite(7,1); //Motor 2&lt;br /&gt;
analogWrite(9,254); //Motor 2 PWM&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; digitalWrite(12,0); //Motor1&lt;br /&gt;
digitalWrite(11,1); //Motor 1&lt;br /&gt;
analogWrite(10,254); //Motor 1 PWM&lt;br /&gt;
}&lt;br /&gt;
//esquerda&lt;br /&gt;
if (x==&#39;e&#39;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(8,1); //Motor 2&lt;br /&gt;
digitalWrite(7,0); //Motor 2&lt;br /&gt;
analogWrite(9,254); //Motor 2 PWM&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; digitalWrite(12,0); //Motor1&lt;br /&gt;
digitalWrite(11,1); //Motor 1&lt;br /&gt;
analogWrite(10,254); //Motor 1 PWM&lt;br /&gt;
}&lt;br /&gt;
// traz direita&lt;br /&gt;
if (x==&#39;f&#39;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(8,0); //Motor2&lt;br /&gt;
digitalWrite(7,1); //Motor 2&lt;br /&gt;
analogWrite(9,254); //Motor 2 PWM&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; digitalWrite(12,1); //Motor1&lt;br /&gt;
digitalWrite(11,0); //Motor 1&lt;br /&gt;
analogWrite(10,254); //Motor 1 PWM&lt;br /&gt;
}&lt;br /&gt;
// traz esquerda&lt;br /&gt;
if (x==&#39;g&#39;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;digitalWrite(8,1); //Motor 2&lt;br /&gt;
digitalWrite(7,0); //Motor 2&lt;br /&gt;
analogWrite(9,254); //Motor 2 PWM&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; digitalWrite(12,1); //Motor1&lt;br /&gt;
digitalWrite(11,0); //Motor 1&lt;br /&gt;
analogWrite(10,254); //Motor 1 PWM&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Código vb.net:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.box.com/s/g07tekxpufp21crmvnwk&quot;&gt;https://www.box.com/s/g07tekxpufp21crmvnwk&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Obrigado pela visita, fiquem bem e até á próxima parte do projeto.&lt;br /&gt;
Cumprimentos Rui Marinho!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/3054514655453951847/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2013/06/carro-autonomo-parte-2-projeto-arduino.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3054514655453951847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3054514655453951847'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2013/06/carro-autonomo-parte-2-projeto-arduino.html' title='Carro Autónomo (Parte 2) - Projeto Arduino'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxBt3qz4Al_N2TGTFlvHLeUYGoZau0Fqn3ymr3WzNbohcRgN6lleWvaAxSnlFacKa3okWMrjNfg2ddJjtOxhfopCK5c-r5b7zJpZ2zF0eTT9LI6sZ3Zw_u6osaEshODtpRABQ-RahgSZ58/s72-c/Capturar.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-3422087352493315222</id><published>2013-06-07T02:27:00.001+01:00</published><updated>2013-06-07T04:15:04.690+01:00</updated><title type='text'>Ultrassónico Hcsr04 + Arduino 1.0.5</title><content type='html'>&lt;pre&gt; Boas! Mais um tutorial desta vez a demonstrar o funcionamento do sensor&lt;/pre&gt;
&lt;pre&gt; ultra-sónico &quot;Hc sr04&quot; com o arduino. Mais uma vez fiquem com as imagens,&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;vídeos e código.&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Imagens:&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixNiEXYDmzNAcLpM1b2JnpMgVGizppAEIkqk0PSgflsC9PckDGxLeNv_5HVmlzjcCaM3sBGgVsyt5OA9mfi8uEsbI8-ufI2wPRFTgSiIVRkb5pFTQHphNUjxrS7DC9pn8NQQkpKLBnirKH/s1600/fig3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixNiEXYDmzNAcLpM1b2JnpMgVGizppAEIkqk0PSgflsC9PckDGxLeNv_5HVmlzjcCaM3sBGgVsyt5OA9mfi8uEsbI8-ufI2wPRFTgSiIVRkb5pFTQHphNUjxrS7DC9pn8NQQkpKLBnirKH/s320/fig3.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif9XC6cw7pysM0unXiSadyDbHqwSQugO6z3pMTw1x9FRlCzEw-u7Lb0yCOVnH_ue9KlGfLk_ddSOnsgW9eFqtRm0mkFCMSqeU6SIFigykUcLJn8RQ6oAhA3b48sR4f1VCCc66SkJqQG8Yx/s1600/imagem++codigo.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif9XC6cw7pysM0unXiSadyDbHqwSQugO6z3pMTw1x9FRlCzEw-u7Lb0yCOVnH_ue9KlGfLk_ddSOnsgW9eFqtRm0mkFCMSqeU6SIFigykUcLJn8RQ6oAhA3b48sR4f1VCCc66SkJqQG8Yx/s320/imagem++codigo.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://famosastudio.com/fastwp303/wp-content/uploads/2011/12/UsingHC-SR04WithArduino.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://famosastudio.com/fastwp303/wp-content/uploads/2011/12/UsingHC-SR04WithArduino.png&quot; width=&quot;256&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Vídeo:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/YnrFooo-zrE?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Código Arduino:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;span style=&quot;color: #7e7e7e;&quot;&gt;//&amp;nbsp;---------------------------------------------------------------------------&lt;/span&gt;
&lt;span style=&quot;color: #7e7e7e;&quot;&gt;//&amp;nbsp;Example&amp;nbsp;NewPing&amp;nbsp;library&amp;nbsp;sketch&amp;nbsp;that&amp;nbsp;does&amp;nbsp;a&amp;nbsp;ping&amp;nbsp;about&amp;nbsp;20&amp;nbsp;times&amp;nbsp;per&amp;nbsp;second.&lt;/span&gt;
&lt;span style=&quot;color: #7e7e7e;&quot;&gt;//&amp;nbsp;---------------------------------------------------------------------------&lt;/span&gt;

#include&amp;nbsp;&amp;lt;&lt;span style=&quot;color: #cc6600;&quot;&gt;NewPing&lt;/span&gt;.h&amp;gt;

#define&amp;nbsp;TRIGGER_PIN&amp;nbsp;&amp;nbsp;6&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #7e7e7e;&quot;&gt;// Arduino pin tied to trigger pin on the ultrasonic sensor.&lt;/span&gt;
#define&amp;nbsp;ECHO_PIN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #7e7e7e;&quot;&gt;// Arduino pin tied to echo pin on the ultrasonic sensor.&lt;/span&gt;
#define&amp;nbsp;MAX_DISTANCE&amp;nbsp;200&amp;nbsp;&lt;span style=&quot;color: #7e7e7e;&quot;&gt;// Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.&lt;/span&gt;

&lt;span style=&quot;color: #cc6600;&quot;&gt;NewPing&lt;/span&gt; sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); &lt;span style=&quot;color: #7e7e7e;&quot;&gt;// NewPing setup of pins and maximum distance.&lt;/span&gt;

&lt;span style=&quot;color: #cc6600;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;setup&lt;/b&gt;&lt;/span&gt;() {
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;Serial&lt;/b&gt;&lt;/span&gt;.&lt;span style=&quot;color: #cc6600;&quot;&gt;begin&lt;/span&gt;(9600); &lt;span style=&quot;color: #7e7e7e;&quot;&gt;// Open serial monitor at 115200 baud to see ping results.&lt;/span&gt;
}

&lt;span style=&quot;color: #cc6600;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;loop&lt;/b&gt;&lt;/span&gt;() {
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;delay&lt;/span&gt;(50);                      &lt;span style=&quot;color: #7e7e7e;&quot;&gt;// Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #cc6600;&quot;&gt;int&lt;/span&gt; uS = sonar.&lt;span style=&quot;color: #cc6600;&quot;&gt;ping&lt;/span&gt;(); &lt;span style=&quot;color: #7e7e7e;&quot;&gt;// Send ping, get ping time in microseconds (uS).&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;Serial&lt;/b&gt;&lt;/span&gt;.&lt;span style=&quot;color: #cc6600;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #006699;&quot;&gt;&quot;Ping: &quot;&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;Serial&lt;/b&gt;&lt;/span&gt;.&lt;span style=&quot;color: #cc6600;&quot;&gt;print&lt;/span&gt;(uS / US_ROUNDTRIP_CM); &lt;span style=&quot;color: #7e7e7e;&quot;&gt;// Convert ping time to distance in cm and print result (0 = outside set distance range)&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #cc6600;&quot;&gt;&lt;b&gt;Serial&lt;/b&gt;&lt;/span&gt;.&lt;span style=&quot;color: #cc6600;&quot;&gt;println&lt;/span&gt;(&lt;span style=&quot;color: #006699;&quot;&gt;&quot;cm&quot;&lt;/span&gt;);
}&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Obrigado pela visita, fiquem bem e até a próxima.&lt;/div&gt;
&lt;div&gt;
Cumprimentos Rui Marinho!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/3422087352493315222/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2013/06/ultrassonico-hcsr04-arduino-105.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3422087352493315222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3422087352493315222'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2013/06/ultrassonico-hcsr04-arduino-105.html' title='Ultrassónico Hcsr04 + Arduino 1.0.5'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixNiEXYDmzNAcLpM1b2JnpMgVGizppAEIkqk0PSgflsC9PckDGxLeNv_5HVmlzjcCaM3sBGgVsyt5OA9mfi8uEsbI8-ufI2wPRFTgSiIVRkb5pFTQHphNUjxrS7DC9pn8NQQkpKLBnirKH/s72-c/fig3.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-4319206693147946850</id><published>2013-04-19T00:56:00.000+01:00</published><updated>2013-04-19T01:00:41.139+01:00</updated><title type='text'>Carro Autónomo (Parte 1) - Projeto Arduino </title><content type='html'>Boas!&lt;br /&gt;
&lt;div&gt;
Já algum tempo que não publico projetos aqui no blog, neste momento estou a desenvolver um carro autónomo. A ideia é quando o carro estiver a 15cm de um obstáculo a sua frente, este parar , e comparar as distâncias do lado esquerdo e direito e a que for maior o carro virar para esse mesmo lado, e também fazer o controlo manual do carrinho através de uma interface gráfica.Entretanto fiquem com a lista de material e as respetivas imagens:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Material:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
-1 Arduino (&lt;a href=&quot;http://www.g7electronica.net/pt/536-arduino-leonardo-pre-order.html&quot;&gt;http://www.g7electronica.net/pt/536-arduino-leonardo-pre-order.html&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
-2 módulos Xbee 2mW Série 2.5 (&lt;a href=&quot;http://www.botnroll.com/product.php?id_product=83&quot;&gt;http://www.botnroll.com/product.php?id_product=83&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
-1 Shield Xbee (&lt;a href=&quot;http://www.botnroll.com/product.php?id_product=298&quot;&gt;http://www.botnroll.com/product.php?id_product=298&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
-1 Usb-Xbee (&lt;a href=&quot;http://www.botnroll.com/product.php?id_product=44&quot;&gt;http://www.botnroll.com/product.php?id_product=44&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
-1 Chassis de um carro R/C + motores&lt;/div&gt;
&lt;div&gt;
-1 Sensor Ultrassónico Hc04 (&lt;a href=&quot;http://www.g7electronica.net/pt/modulos/393-ultrasonic-module.html&quot;&gt;http://www.g7electronica.net/pt/modulos/393-ultrasonic-module.html&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
-1 Servo-Motor (&lt;a href=&quot;http://www.g7electronica.net/pt/servos/79-servo-standard.html&quot;&gt;http://www.g7electronica.net/pt/servos/79-servo-standard.html&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
-1 Controlador de 2 motores dc (l293d) (&lt;a href=&quot;http://www.g7electronica.net/pt/ics/179-l293d.html&quot;&gt;http://www.g7electronica.net/pt/ics/179-l293d.html&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
-1 Protoboard 78*58 mm (&lt;a href=&quot;http://www.botnroll.com/product.php?id_product=279&quot;&gt;http://www.botnroll.com/product.php?id_product=279&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-k0UN49ojQcX6ZUZBmfLC_hiPASbH7VcvQdiivEewz5HOQCzuhO4z3fc07q4HiGWB0i73jt5-y0O5rNuVPS8xX-qsJ8ZI8ubhPtpFJl0P_-BQgVzg6-QXmwW8YI6qzFxIi_Gd35PQ_rWW/s1600/IMG_2042.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-k0UN49ojQcX6ZUZBmfLC_hiPASbH7VcvQdiivEewz5HOQCzuhO4z3fc07q4HiGWB0i73jt5-y0O5rNuVPS8xX-qsJ8ZI8ubhPtpFJl0P_-BQgVzg6-QXmwW8YI6qzFxIi_Gd35PQ_rWW/s320/IMG_2042.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
*Material Do Projeto&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSNZpXDPVJM_7PfLKxn6YKFyWNUDJLSm9ghWb2sOCs_MtuLmz1gldGxLqHCLBGkpzILk2pLznZa5sWGSeDqRwMJ0YbDNIX6opIIKij3D-cbUKAi9hOlsZ2BAA42UtsahXcD80VnAM-Fl3v/s1600/IMG_2046.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSNZpXDPVJM_7PfLKxn6YKFyWNUDJLSm9ghWb2sOCs_MtuLmz1gldGxLqHCLBGkpzILk2pLznZa5sWGSeDqRwMJ0YbDNIX6opIIKij3D-cbUKAi9hOlsZ2BAA42UtsahXcD80VnAM-Fl3v/s320/IMG_2046.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
*Parte Inferior do chassis do Carro R/C&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Entretanto faço outra publicação &amp;nbsp;com a 2ª parte do projeto.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Cumpimentos Rui Marinho!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/4319206693147946850/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2013/04/carro-autonomo-parte-1-projeto-arduino.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4319206693147946850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4319206693147946850'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2013/04/carro-autonomo-parte-1-projeto-arduino.html' title='Carro Autónomo (Parte 1) - Projeto Arduino '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-k0UN49ojQcX6ZUZBmfLC_hiPASbH7VcvQdiivEewz5HOQCzuhO4z3fc07q4HiGWB0i73jt5-y0O5rNuVPS8xX-qsJ8ZI8ubhPtpFJl0P_-BQgVzg6-QXmwW8YI6qzFxIi_Gd35PQ_rWW/s72-c/IMG_2042.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-3697317951584806316</id><published>2012-08-19T17:47:00.002+01:00</published><updated>2012-08-20T00:29:33.341+01:00</updated><title type='text'>Arduino + Bargraph </title><content type='html'>Boas!&lt;br /&gt;
&lt;div&gt;
Hoje trago aqui mais um tutorial a utilizar uma &quot;Bargraph&quot; igual ao da imagem abaixo, este componente consiste num agulmerado de 10 leds, só que com um aspeto visual &quot;mais limpo&quot;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ptrobotics.com/img/p/949-1151-thickbox.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://www.ptrobotics.com/img/p/949-1151-thickbox.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Bom fiquem então com o projeto:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Material necessário:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
-1 Bargraph&lt;/div&gt;
&lt;div&gt;
-1 Arduino&lt;/div&gt;
&lt;div&gt;
-10 Resistencias de 220 Ohm&lt;/div&gt;
&lt;div&gt;
-1 Potenciómetro&lt;/div&gt;
&lt;div&gt;
-Fio&amp;nbsp;&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;b&gt;Esquema:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://arduino.cc/en/uploads/Tutorial/BarGraph_bb.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;353&quot; src=&quot;http://arduino.cc/en/uploads/Tutorial/BarGraph_bb.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Código:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;const&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;analogPin&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;A0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;const&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;ledCount&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;ledPins&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; font-weight: bold; line-height: 12px;&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;thisLed&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;thisLed&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;ledCount&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;thisLed&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;pinMode&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;ledPins&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;thisLed&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;background-color: white; color: #006699; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br style=&quot;background-color: white; font-family: monospace; font-size: small; line-height: 12px;&quot; /&gt;
&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw3&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; font-weight: bold; line-height: 12px;&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: monospace; font-size: small; line-height: 12px;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;sensorReading&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;analogRead&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;analogPin&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;ledLevel&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;sensorReading&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;1023&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;ledCount&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;thisLed&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nu0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;thisLed&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;ledCount&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;thisLed&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;thisLed&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;ledLevel&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;digitalWrite&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;ledPins&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;thisLed&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;background-color: white; color: #006699; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;HIGH&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw1&quot; style=&quot;background-color: white; color: #cc6600; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;digitalWrite&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;ledPins&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;thisLed&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kw2&quot; style=&quot;background-color: white; color: #006699; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;LOW&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;br0&quot; style=&quot;background-color: white; font-family: monospace; font-size: x-small; line-height: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Vídeo:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/WyYd4Qo7ZIk?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
Para mais informação sobre este tuturial &lt;a href=&quot;http://arduino.cc/en/Tutorial/BarGraph&quot; target=&quot;_blank&quot;&gt;clique aqui&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Se tiver alguma duvida ou sugestão deixe um comentário.&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
Cumprimentos Rui Marinho!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/3697317951584806316/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/08/arduino-bargraph.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3697317951584806316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3697317951584806316'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/08/arduino-bargraph.html' title='Arduino + Bargraph '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-4664926327593019825</id><published>2012-08-19T14:37:00.000+01:00</published><updated>2012-08-19T14:40:31.245+01:00</updated><title type='text'>Instalar o arduino no Windows </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Boas! Como o titulo indica realizei um tutorial onde pode aprender a instalar as drives do seu respetivo arduino, espero que gostem.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Neste &amp;nbsp;tutorial &amp;nbsp;é utilizado o Arduino Leonardo , mas poderia ser utilizado outro como por exemplo Arduino uno.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;Material&amp;nbsp;necessário&lt;/b&gt;&amp;nbsp;para este tutorial:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;- Arduino uno/ Leonardo/Mega ...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;- PC com Windows 7/Windows Vista&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;- &lt;a href=&quot;http://arduino.cc/en/Main/Software&quot; target=&quot;_blank&quot;&gt;Software do Arduino&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;- Cabo do seu respetivo arduino&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;Após ter todo o material necessário siga os seguintes passos:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;&amp;nbsp; &lt;b&gt;-Passo 1:&lt;/b&gt; Após conectar o Arduino ao PC através do respectivo cabo usb, então aparcerá uma mensagem &amp;nbsp;no windows com o texto &quot;Software de controlador de dispositivo instalado sem êxito.&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-M-2t_BczY40X2r0CVX9dMIbzoA6clyTULngrH9xD71uvI3Oy4-iWwOGIPYsk37iq-z1F-E25wZ8JQY4keQh1HaFayXwXUbdNINvUr8L5S0JBJQIfanv0DRGy03hFA3tqP3tT_fsyA3uZ/s1600/a1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-M-2t_BczY40X2r0CVX9dMIbzoA6clyTULngrH9xD71uvI3Oy4-iWwOGIPYsk37iq-z1F-E25wZ8JQY4keQh1HaFayXwXUbdNINvUr8L5S0JBJQIfanv0DRGy03hFA3tqP3tT_fsyA3uZ/s400/a1.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; &lt;b&gt;-Passo 2:&lt;/b&gt; Após aparecer esta mensagem abra o painel de controlo do windows e clique em &quot;Hardware e Som&quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3KfP_ZpHnfVvq3Ox7XbPwrcSTskvsIxvg6P4j73bWf-QTz-44eWNoQU1GTg4loCl0BHZDx283FcSlhZmFObMxwAujFijI78eAKPXWjmOWnKynhJC93OYi0S2RjHjWcNMk2S_eoWIF8i4w/s1600/a2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3KfP_ZpHnfVvq3Ox7XbPwrcSTskvsIxvg6P4j73bWf-QTz-44eWNoQU1GTg4loCl0BHZDx283FcSlhZmFObMxwAujFijI78eAKPXWjmOWnKynhJC93OYi0S2RjHjWcNMk2S_eoWIF8i4w/s400/a2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &lt;b&gt;-Passo 3:&lt;/b&gt; Em seguida clique em &quot;Gestor de Dispositivos&quot; no canto superior direito;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9bJnG7cwzpW5gqYC6XudR9IalXyizQa47yIdei8v_r2g6av5Y4BgoRZmjm1St3pBLSbunNh3Ctm6H4u1XbEZcJEsjorZEvpcW_VocHKG3bh7mCEq0h0Si_aghSsjbA0iSDOEeK6SBFJEV/s1600/a3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9bJnG7cwzpW5gqYC6XudR9IalXyizQa47yIdei8v_r2g6av5Y4BgoRZmjm1St3pBLSbunNh3Ctm6H4u1XbEZcJEsjorZEvpcW_VocHKG3bh7mCEq0h0Si_aghSsjbA0iSDOEeK6SBFJEV/s400/a3.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &lt;b&gt;-Passo 4:&lt;/b&gt; Agora selecione o respetivo arduino não instalado no windows , este deverá aparecer com um ponto de exclamação;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirinOmkwep1IzfV8B9rjJdq3z5iPQx562Ofq1P6pc2AWN8QUlLZiF_XU5DbgVeQOAH52mOlhKYpR18yrB0yfp0e9Cu-1-pBmGeIWEvUij0qNUQMu387-wRQse2KkhlPrctwMr6ChiTED5V/s1600/a4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;291&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirinOmkwep1IzfV8B9rjJdq3z5iPQx562Ofq1P6pc2AWN8QUlLZiF_XU5DbgVeQOAH52mOlhKYpR18yrB0yfp0e9Cu-1-pBmGeIWEvUij0qNUQMu387-wRQse2KkhlPrctwMr6ChiTED5V/s400/a4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &lt;b&gt;-Passo 5:&lt;/b&gt; Após selecionado, clique sobre este om o botão direito do rato e selecione a opção &quot;Propriedades&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ9j2iLS5ALX09tLlPmN_rEkUpLBzwC74B5ckIwbTVIX3PqihniX7WaVyhcAYo_uNW8Nv4pj8l-OoleaaTpQLFq1bCavFeXS1hnJAJFS0907QG08jxnOeKJGa-aWDAqW1NERFWnge_ahTb/s1600/a5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ9j2iLS5ALX09tLlPmN_rEkUpLBzwC74B5ckIwbTVIX3PqihniX7WaVyhcAYo_uNW8Nv4pj8l-OoleaaTpQLFq1bCavFeXS1hnJAJFS0907QG08jxnOeKJGa-aWDAqW1NERFWnge_ahTb/s400/a5.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;b&gt; -Passo 6:&lt;/b&gt; Assim que a janela &quot;Propriedades de Arduino XXX&quot; abrir &amp;nbsp;clique sobre o botão &quot;Actualizar Controlador&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho4ky-K5pG97WuG1PvuV5i0377DjDR8S3VNrjh046Z38CDp74Aki2kddAFxqC_Fbe9vQnHzceu1ejEaS5nuhBj14ANS12uALCnG4QsC-SrJyP-D-Dm1EdilIaUlkS2HnutvX76Ou8cQa1K/s1600/a6.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho4ky-K5pG97WuG1PvuV5i0377DjDR8S3VNrjh046Z38CDp74Aki2kddAFxqC_Fbe9vQnHzceu1ejEaS5nuhBj14ANS12uALCnG4QsC-SrJyP-D-Dm1EdilIaUlkS2HnutvX76Ou8cQa1K/s400/a6.PNG&quot; width=&quot;357&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &lt;b&gt;-Passo 7:&lt;/b&gt; Agora irá aparecer uma janela com duas opções, selecione a opção &quot;Procurar software do Controlador no computador&quot;;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOXcO87tRrQacrajumn01ZZbHHuk2eS919TqMUmZTvtKY_Bc2WWHw5fNPEXpMpwuvZ-u5SAZjnv54mfI52iZFWxV1pgUhF2BBQpqDUbFsNH61MKvodACz002xTE28ubBP0lEYsWaKXet6x/s1600/a7.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOXcO87tRrQacrajumn01ZZbHHuk2eS919TqMUmZTvtKY_Bc2WWHw5fNPEXpMpwuvZ-u5SAZjnv54mfI52iZFWxV1pgUhF2BBQpqDUbFsNH61MKvodACz002xTE28ubBP0lEYsWaKXet6x/s400/a7.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;&amp;nbsp; -Passo 8: &lt;/b&gt;Caso ainda não tenha feito o download do &lt;a href=&quot;http://arduino.cc/en/Main/Software&quot; target=&quot;_blank&quot;&gt;Software do Arduino&lt;/a&gt;&amp;nbsp;esta é a altura&amp;nbsp;&amp;nbsp;, assim feito o download do software, extrai- o e decore a sua localização, em seguida volte á janela e clique sobre o botão &quot;Procurar&quot;;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhTBCyUkns_Hd3bJ6TRShMDSZxpRSYVYMJVgw2Bdw5rdw0yj-3pN3gISMpZWmikSfbqA879njyhITqLwVJz0PmfrrtuSFGhPdHlhxue0KUQsJBltsU-AfUZ4N573Bqx4zjrkU_mRCVLlm/s1600/a8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;293&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhTBCyUkns_Hd3bJ6TRShMDSZxpRSYVYMJVgw2Bdw5rdw0yj-3pN3gISMpZWmikSfbqA879njyhITqLwVJz0PmfrrtuSFGhPdHlhxue0KUQsJBltsU-AfUZ4N573Bqx4zjrkU_mRCVLlm/s400/a8.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &lt;b&gt;-Passo 9:&lt;/b&gt; Localize o local para onde extraio o Software arduino, abra a respetiva pasta &amp;nbsp;e selecione a subpasta &quot;Drivers&quot; conforme a imagem abaixo, e clique no botão &quot;OK&quot;;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilTWqNENGNsJMjOwsfqa6WR6IZHZTiiV1H2UPa6z0kH_Euf5ZrA3LYcwM7Lg5cwo0duHKJTipWjgFIT6fmntney5AuVT77OZf4apJcvitbIeFbDIGdvGcoEjL2QBy9Q7L3QrcCv8uGL67E/s1600/a9.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;291&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilTWqNENGNsJMjOwsfqa6WR6IZHZTiiV1H2UPa6z0kH_Euf5ZrA3LYcwM7Lg5cwo0duHKJTipWjgFIT6fmntney5AuVT77OZf4apJcvitbIeFbDIGdvGcoEjL2QBy9Q7L3QrcCv8uGL67E/s400/a9.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &lt;b&gt;-Passo 10:&lt;/b&gt; Agora é só &amp;nbsp;clicar sobre o botão &quot;seguinte&quot;;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8JzEv3QLg6jlP18p1aT1bK7MSCRil-X2j5h16KYWHlosNgPjYyet1e1ts29sQ3ULH0x5eQlwn1LufPLvFtms3M-v7bc-Iv_ffJnXFIbCD2bgxzcGPTBQvDAA1S6dc-8IUgZCmGgSB-bsn/s1600/a10.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;293&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8JzEv3QLg6jlP18p1aT1bK7MSCRil-X2j5h16KYWHlosNgPjYyet1e1ts29sQ3ULH0x5eQlwn1LufPLvFtms3M-v7bc-Iv_ffJnXFIbCD2bgxzcGPTBQvDAA1S6dc-8IUgZCmGgSB-bsn/s400/a10.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;&lt;b&gt; -Passo 11:&lt;/b&gt; Se lhe aparecer uma janela como na imagem abaixo, não se preocupe,isto deve- se ao fato do windows não reconhecer o fabricante dos drivers, nada de alarmante, apenas selecione a opção &quot;Instalar este software do controlador mesmo assim&quot;;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9_7leNQZW1rkgMAkTT4sIccVOJL8C4IpY1Vr5y2JVFz-Af6n4DJHytACPirsrZDgnmSazyoP2RYhSSY4H3i7II7F0zPpEad2qIBmT_OhlUf6JmjSRzkhSDKdk3LoV2wwIyLmAVgx2YPiO/s1600/a11.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;305&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9_7leNQZW1rkgMAkTT4sIccVOJL8C4IpY1Vr5y2JVFz-Af6n4DJHytACPirsrZDgnmSazyoP2RYhSSY4H3i7II7F0zPpEad2qIBmT_OhlUf6JmjSRzkhSDKdk3LoV2wwIyLmAVgx2YPiO/s400/a11.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &lt;b&gt;-Passo 12:&lt;/b&gt; Agora deverá aparecer a mensagem &quot;O windows actualizou o software de controlador com êxito&quot;;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcpKs9qVY5BGGVroV1xv1DOPuBAFT88gYOYhnexMhG1383XNPqgQEGycRbBz27aW5CUScI0s0ja41prpx7GPcmIiBfrygYn_FuwSk88uJfktWrmQnLV7bcgVIofSIIatYsXUWJKVTwfl3Y/s1600/a12.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;303&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcpKs9qVY5BGGVroV1xv1DOPuBAFT88gYOYhnexMhG1383XNPqgQEGycRbBz27aW5CUScI0s0ja41prpx7GPcmIiBfrygYn_FuwSk88uJfktWrmQnLV7bcgVIofSIIatYsXUWJKVTwfl3Y/s400/a12.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; &lt;b&gt;-Passo 13:&lt;/b&gt; Caso deseje verificar se a instalação deste foi bem sucedida, abra o software &amp;nbsp;do Arduino, e poderá ver algo como na imagem abaixo, faça então o upload do exemplo &quot;bink&quot; e verifique se o led do pino digital &amp;nbsp;13 do Arduino está a piscar com o intervalo de um segundo.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOyaVt3t1oJlGdthrJ9NXc1zSfdlRiZvaiW7u8_7oLmeUpUIOObtgUg5ynRY0Xek07KWVcl5clYq-D1HlGOk-1oSpWbFs-1reYgiDOjynO3DTXh9dc881cDP1x2ekJNOJ7nL7EPVPi6dx_/s1600/a13.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOyaVt3t1oJlGdthrJ9NXc1zSfdlRiZvaiW7u8_7oLmeUpUIOObtgUg5ynRY0Xek07KWVcl5clYq-D1HlGOk-1oSpWbFs-1reYgiDOjynO3DTXh9dc881cDP1x2ekJNOJ7nL7EPVPi6dx_/s400/a13.PNG&quot; width=&quot;331&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b style=&quot;background-color: red;&quot;&gt;Atenção:&lt;/b&gt; Se mesmo a seguir estes passos não seja bem sucedido deixe um comentário com a sua duvida.&lt;/div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Cumprimentos Rui Marinho!</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/4664926327593019825/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/08/instalar-o-arduino-no-windows.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4664926327593019825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4664926327593019825'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/08/instalar-o-arduino-no-windows.html' title='Instalar o arduino no Windows '/><author><name>electronicpiece</name><uri>http://www.blogger.com/profile/01012432600139691345</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-M-2t_BczY40X2r0CVX9dMIbzoA6clyTULngrH9xD71uvI3Oy4-iWwOGIPYsk37iq-z1F-E25wZ8JQY4keQh1HaFayXwXUbdNINvUr8L5S0JBJQIfanv0DRGy03hFA3tqP3tT_fsyA3uZ/s72-c/a1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-2479951029831649383</id><published>2012-08-10T07:43:00.006+01:00</published><updated>2012-08-10T07:45:23.243+01:00</updated><title type='text'>Arduino Leonardo</title><content type='html'>&amp;nbsp; &amp;nbsp;Boas pessoal!&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Ultimamente tenho andado um pouco afastado do blog, mas já tenho alguns projetos em mente, agora é apenas uma questão de tempo até o meu arduino Leonardo chegar. :D&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://encrypted-tbn2.google.com/images?q=tbn:ANd9GcR3fpedQpNH7YVl5BnO7LSg4Y-dPJIUbHT3TrbLHRL_Z8_IxFrF4g&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://encrypted-tbn2.google.com/images?q=tbn:ANd9GcR3fpedQpNH7YVl5BnO7LSg4Y-dPJIUbHT3TrbLHRL_Z8_IxFrF4g&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Bom mas passemos ao que interessa , tal como o nome do post indica venho aqui falar um pouco da nova placa com a marca Arduino, esta destaca-se visualmete pelo seu conector usb( micro usb) e por ter apenas um só microcontrolador&amp;nbsp;embutido, isto deve-se ao fato de que este chip(&lt;span style=&quot;background-color: white; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 14px; line-height: 23px;&quot;&gt;ATmega32u4&lt;span style=&quot;color: #555555;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&amp;nbsp;possibilitar a inteface de comunicação usb, substituindo assim o chip da ftdi e o&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 14px; line-height: 23px;&quot;&gt;ATmega8U2&lt;/span&gt;, outra vantagem que também se destaca é o seu custo ser menor ao arduino uno rondando os 18 €.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Mas nem tudo são vantagens &amp;nbsp;pois sendo o&amp;nbsp;
&lt;span style=&quot;background-color: white; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 14px; line-height: 23px;&quot;&gt;ATmega32u4&lt;/span&gt;&amp;nbsp;&amp;nbsp;smd, &amp;nbsp;um dos conceitos principais do arduino ( a remoção do chip Atmega 328 para trabalhos por exemplo em breadboards) foi perdida.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Uma curiosidade deste arduino é a possibilidade de emulação dos periféricos rato e teclado , ou seja &amp;nbsp;podemos assim fazer projetos com uma interface mais elaborada como por exemplo um comando para jogos.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Abaixo seguem mais algumas caracteristicas do arduino leonardo assim como um video de apresentação deste pelo próprio Massimo Banzi:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/QS2y-nc3uPI?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Caracteristicas do Arduino Leonardo:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Microcontrolador&amp;nbsp;ATmega32u4&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Tensão de entrada (recomendada) : 7-12V&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Tensão de entrada limites) : 6-20V
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Pinos Digitais de Entrada/Saída: 20&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Canais de &amp;nbsp;PWM: 7&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Canais de entrada Analógica: 12&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Clock: 16MHz&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Corrente DC por cada pino de E/S operando a 5V: 40 mA&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;Corrente DC por cada pino de E/S operando a 3V: 50 mA
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;32 KB de memória Flash (4KB são utilizados pelo bootloader)
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: inherit; line-height: 18px;&quot;&gt;SRAM: 2.5 KB (&lt;/span&gt;
&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;ATmega32u4)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;EEPROM: 1KB (&lt;/span&gt;
&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;ATmega32u4)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&amp;nbsp; &amp;nbsp;Cumprimentos Rui Marinho!</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/2479951029831649383/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/08/arduino-leonardo.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/2479951029831649383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/2479951029831649383'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/08/arduino-leonardo.html' title='Arduino Leonardo'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-4999700680240100420</id><published>2012-05-01T15:27:00.005+01:00</published><updated>2012-05-01T15:27:48.830+01:00</updated><title type='text'>Onde comprar o arduino?</title><content type='html'>Boas pessoal!&lt;br /&gt;
Neste post resolvi apresentar &amp;nbsp;alguns sites onde existem as melhores opções para a compra do arduino e seus&amp;nbsp;respectivos&amp;nbsp;componentes.&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Em portugal&lt;/span&gt; existem várias lojas de electrónica aqui irei apresentar apenas uma lista daquelas que acho que têm os melhores preços:&lt;br /&gt;
-&amp;nbsp;&lt;a href=&quot;http://www.g7electronica.net/&quot;&gt;http://www.g7electronica.net/&lt;/a&gt;&amp;nbsp;- Tenho feito várias compras de lá e na maior parte das vezes vêem extras&amp;nbsp;incluídos&amp;nbsp;nas encomendas, já para não falar nas promoções que fazem &amp;nbsp;de vês em quando.&lt;br /&gt;
-&lt;a href=&quot;http://www.ptrobotics.com/&quot;&gt;http://www.ptrobotics.com/&lt;/a&gt;&amp;nbsp;- Mais uma loja onde já fiz várias encomendas e estas chegam sempre rápido (no prazo de 3 dias), nestas&amp;nbsp;encomendas&amp;nbsp;a maior parte das vezes também vêem&amp;nbsp;incluídos&amp;nbsp;alguns extras como leds.&lt;br /&gt;
-&lt;a href=&quot;http://www.inmotion.pt/&quot;&gt;http://www.inmotion.pt&lt;/a&gt;&amp;nbsp;- esta deve ser uma das mais completas para quem quer comprar o arduino, pois esta loja deve ser a que contém mais shields para o arduino, e também algumas placas de breakout.&lt;br /&gt;
-&lt;a href=&quot;http://www.ledsandchips.com/shop/&quot;&gt;http://www.ledsandchips.com/shop/&lt;/a&gt;&amp;nbsp; - outra loja com bons preços.&lt;br /&gt;
-&lt;a href=&quot;http://nanoloja-njay.embeddeddreams.com/&quot;&gt;http://nanoloja-njay.embeddeddreams.com/&lt;/a&gt;&amp;nbsp;- nesta &quot;loja&quot; podem encontrar&amp;nbsp;componentes&amp;nbsp;electrónicos a preços bastante baixos.&lt;br /&gt;
-&lt;a href=&quot;http://www.e-shop.goodluckwith.us/shop/category.php?id_category=32&quot;&gt;http://www.e-shop.goodluckwith.us/shop/category.php?id_category=32&lt;/a&gt;&amp;nbsp;em portugal segundo aquilo que eu encontrei esta é a loja com melhores preços para a compra da placa arduino(em portugal).&lt;br /&gt;
-&lt;a href=&quot;http://www.olx.pt/userlistings/venda4you&quot;&gt;http://www.olx.pt/userlistings/venda4you&lt;/a&gt;&amp;nbsp;- &amp;nbsp;aqui podem ainda encontrar algum conteúdo de electrónica a baixo preço.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;No estrangeiro &lt;/span&gt;podemos ver várias lojas através da página oficial de venda do arduino&lt;br /&gt;
-&amp;nbsp;&lt;a href=&quot;http://arduino.cc/en/Main/Buy&quot;&gt;http://arduino.cc/en/Main/Buy&lt;/a&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Melhores preços&lt;/span&gt;&lt;br /&gt;
Sem duvida alguma que os melhores preços para a compra de placas arduino são:&lt;br /&gt;
&amp;nbsp;-&lt;a href=&quot;http://www.ebay.com/sch/i.html?_from=R40&amp;amp;_trksid=p5197.m570.l1313&amp;amp;_nkw=arduino&amp;amp;_sacat=See-All-Categories&quot; target=&quot;_blank&quot;&gt; ebay&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;-&amp;nbsp;&lt;a href=&quot;http://s.dealextreme.com/search/arduino&quot;&gt;http://s.dealextreme.com/search/arduino&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Alguma sugestão ou correcção agradecia que me fossem dirigidos através dos comentários!&lt;br /&gt;
Cumprimentos Rui Marinho!</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/4999700680240100420/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/05/onde-comprar-o-arduino.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4999700680240100420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4999700680240100420'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/05/onde-comprar-o-arduino.html' title='Onde comprar o arduino?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-2783300708524384781</id><published>2012-04-17T00:22:00.000+01:00</published><updated>2012-04-17T00:22:42.656+01:00</updated><title type='text'>Led Fade - arduino</title><content type='html'>&amp;nbsp; &amp;nbsp;Neste simples tutorial, com base no site do &lt;a href=&quot;http://arduino.cc/en/Tutorial/Fade&quot; target=&quot;_blank&quot;&gt;arduino&lt;/a&gt;&amp;nbsp;vou demonstrar como utilizar a função &quot;analogWrite&quot; presente no arduino.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;A função &quot;analogwrite&quot; não é nada mais que a utilização do PWM(pulse width modulation) &amp;nbsp;ou em português modulação da duração do pulso, o pwm está presente apenas em alguns pinos do arduino, no caso do duemilinove/uno nos pinos 11,10,9,6,5,3, e esta função permite que exista uma variação dos volts(0V - 5V) que são fornecidos por exemplo ao pino 10, ou seja pode se dizer que é um variador de tensão.&lt;br /&gt;
Então mãos à obra!&lt;br /&gt;
Circuito:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5giwDgYJLGoZh5SFFEj0hADIvrEQh5OiBtZOT38itjJ0G2O-h6rAHHRvJq-msxHWlQQ7_74dReh0d66I6vTGuJWQhEbD2tkHRa7G33ughcFGwZYs_6chXAmET4Vd6oxu29QzmLb0B0EN9/s1600/xs.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;185&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5giwDgYJLGoZh5SFFEj0hADIvrEQh5OiBtZOT38itjJ0G2O-h6rAHHRvJq-msxHWlQQ7_74dReh0d66I6vTGuJWQhEbD2tkHRa7G33ughcFGwZYs_6chXAmET4Vd6oxu29QzmLb0B0EN9/s400/xs.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Código:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;int led = 10; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //pino onde irá ligar o led&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;int brightness = 0; &amp;nbsp; &amp;nbsp;// quanto brilho terá o led&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;int fadeAmount = 5; &amp;nbsp; &amp;nbsp;// how many points to fade the LED by&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void setup()&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; pinMode(led, OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void loop() &amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; analogWrite(led, brightness);// função analogwrite, temos o pino led, e temos a o brilho , ou o valor do pwm &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; // Altera o brilho do led no loop seguinte&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; brightness = brightness + fadeAmount;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; // reverte a direção do fade, passando de incrementar valores a descrementar e vice versa&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; if (brightness == 0 || brightness == 255) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; fadeAmount = -fadeAmount ;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; } &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(30); &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&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Espero que gostem, alguma correção ou questão a fazer é só comentar.&lt;br /&gt;
Fiquem bem, cumprimentos Rui Marinho !&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/2783300708524384781/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/04/led-fade-arduino.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/2783300708524384781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/2783300708524384781'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/04/led-fade-arduino.html' title='Led Fade - arduino'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5giwDgYJLGoZh5SFFEj0hADIvrEQh5OiBtZOT38itjJ0G2O-h6rAHHRvJq-msxHWlQQ7_74dReh0d66I6vTGuJWQhEbD2tkHRa7G33ughcFGwZYs_6chXAmET4Vd6oxu29QzmLb0B0EN9/s72-c/xs.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-7337977935789222146</id><published>2012-03-13T23:08:00.002+00:00</published><updated>2012-03-13T23:11:52.102+00:00</updated><title type='text'>Arduino Knob - Servo e potenciómetro</title><content type='html'>Boas Pessoal!&lt;br /&gt;
&lt;div&gt;
Hoje trago um mini&amp;nbsp;tutorial&amp;nbsp;de como controlar a rotação do servo através do&amp;nbsp;potenciómetro, abaixo deixo -vos com o código, o material utilizado, o esquemático de ligações ao arduino, e vou ainda fazer um vídeo deste em funcionamento :&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Material utilizado:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
-Um Servo Motor&lt;/div&gt;
&lt;div&gt;
-Um Arduino&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
-Um Potenciómetro&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
-Uma BreadBoard&lt;/div&gt;
&lt;div&gt;
-Fio&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Esquemático de ligações:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd4p3efCcCPq8bFYH3bCWURgxglWfg1ZWJkbeJoy_k2Sb2r3P1_cYTrH8yqETYiYWX9iXhPgF4FweUps8ZzQbg3puqreoCyBbMOP3Moo9L_DPBPox4Ljgy4kReY-SDgeh_jwqr18NlmTN6/s1600/Capturar.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd4p3efCcCPq8bFYH3bCWURgxglWfg1ZWJkbeJoy_k2Sb2r3P1_cYTrH8yqETYiYWX9iXhPgF4FweUps8ZzQbg3puqreoCyBbMOP3Moo9L_DPBPox4Ljgy4kReY-SDgeh_jwqr18NlmTN6/s400/Capturar.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Código:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
-----------------------------&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
#include &amp;lt;Servo.h&amp;gt; //incluir a livraria &quot;servo&quot;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
Servo myservo; &amp;nbsp;// cria uma variável &amp;nbsp;com o nome &quot;myservo&quot; para o controlo do servo&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
int val; &amp;nbsp; &amp;nbsp;//variável que vai armazenar os valores fornecidos pelo potenciómetro&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
void setup()&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
{&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; myservo.attach(6); &amp;nbsp;// &amp;nbsp;o servo liga ao pino 6 do arduino&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
}&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
void loop()&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
{&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; val = analogRead(A0); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// lê o valor presente no pino analógico 0&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; val = map(val, 0, 1023, 0, 179); &amp;nbsp; &amp;nbsp; // escala o valor &amp;nbsp;para usar &amp;nbsp;com o servo ( o valor vai de 0º a 179 º)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; myservo.write(val); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// muda a posição em que se encontra o servo de acordo com o valor escalado&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; delay(5); &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; // intervalo de 5 milisegundos&lt;/div&gt;
&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;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Cumprimentos Rui Marinho!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/7337977935789222146/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/03/arduino-knob-servo-e-potenciometro.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/7337977935789222146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/7337977935789222146'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/03/arduino-knob-servo-e-potenciometro.html' title='Arduino Knob - Servo e potenciómetro'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd4p3efCcCPq8bFYH3bCWURgxglWfg1ZWJkbeJoy_k2Sb2r3P1_cYTrH8yqETYiYWX9iXhPgF4FweUps8ZzQbg3puqreoCyBbMOP3Moo9L_DPBPox4Ljgy4kReY-SDgeh_jwqr18NlmTN6/s72-c/Capturar.PNG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-6071601151734448801</id><published>2012-03-04T20:18:00.000+00:00</published><updated>2012-03-05T23:09:59.186+00:00</updated><title type='text'>Interligação entre VB e arduino</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; Boas pessoal&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; Neste post vamos mostrar&amp;nbsp;como ligar e desligar pinos do
arduino através do programa Visual Basic -&amp;nbsp;“VB.Net&amp;nbsp;”.:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Abaixo fiquem com aulgumas imagens do programa e o link para o download destes :&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://fastmarketingsolutions.com/wp-content/uploads/2011/07/Microsoft-launches-Arab-version-of-Visual-Studio-2010-in-corporation-with-several-Arab-universities.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;77&quot; src=&quot;http://fastmarketingsolutions.com/wp-content/uploads/2011/07/Microsoft-launches-Arab-version-of-Visual-Studio-2010-in-corporation-with-several-Arab-universities.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://arduino.cc/en/uploads/Main/ArduinoUno_r2_front450px.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;http://arduino.cc/en/uploads/Main/ArduinoUno_r2_front450px.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Links:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Programas&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://dl.dropbox.com/u/59720640/Comunica%C3%A7%C3%A3o%20VB.Net%20com%20Arduino.rar&quot; target=&quot;_blank&quot;&gt;Visual Studio&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://dl.dropbox.com/u/59720640/ligar_desligar_pinos_do_arduino_atraves_da_vb_net.rar&quot; target=&quot;_blank&quot;&gt;Arduino&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express&quot; target=&quot;_blank&quot;&gt;Visual studio&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Espero ter ajudado&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Comprimentos&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Marco Joel&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/6071601151734448801/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/03/boas-pessoal-neste-post-vamos-poder-ver.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/6071601151734448801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/6071601151734448801'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/03/boas-pessoal-neste-post-vamos-poder-ver.html' title='Interligação entre VB e arduino'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03996237044039086130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-6898373760186552501</id><published>2012-02-26T15:57:00.001+00:00</published><updated>2012-03-05T11:56:23.230+00:00</updated><title type='text'>Arduino o documentário- legendas pt-br</title><content type='html'>Boas pessoal!&lt;br /&gt;
Hoje trago - vos um documentário que já andava para publicara à algum tempo!&lt;br /&gt;
Este documentário fala - nos da ferrementa open-source &quot;Arduino&quot;, desde como esta foi criada, a previsões para o futuro e todas as possibilidades de criação que esta tem.&lt;br /&gt;
Então fiquem com vídeo do documentário(partilhem):&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/766yR7EOHxE?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
Fiquem bem!&lt;br /&gt;
Cumps Rui Marinho!</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/6898373760186552501/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/arduino-o-documentario-legendas-pt-br.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/6898373760186552501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/6898373760186552501'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/arduino-o-documentario-legendas-pt-br.html' title='Arduino o documentário- legendas pt-br'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-4068966117462139445</id><published>2012-02-24T00:13:00.003+00:00</published><updated>2012-02-29T10:35:45.988+00:00</updated><title type='text'>Projecto arduino -  Detector de gás</title><content type='html'>&lt;br /&gt;
Boas pessoal!&lt;br /&gt;
Hoje trago - vos mais um projecto, neste caso um detector de gás, para sensor detector de gás estou a usar o &quot;MQ-2&quot;, este sensor tem um custo bastante reduzido, tornando assim este projecto muito fácil de realizar graças ao seu baixo custo e fácil compreensão.&lt;br /&gt;
Abaixo deixo o material utilizado no projecto, assim como algumas imagens e ainda um video deste em funcionamento e claro o código para arduino.&lt;br /&gt;
Caso o vosso sensor demore ou não seja tão &quot;sensível&quot; ao gás, isso é por causa do trimer inserido na placa de breakout, por isso basta com uma chave de fendas ir rodando o trimer até que esteja &quot;sensível&quot; ao valores como querem&lt;br /&gt;
&lt;b&gt;Material Utilizado:&lt;/b&gt;&lt;br /&gt;
-MQ-2 Gas Sensor ( &lt;a href=&quot;http://netdrive.envell.com/pic/ebay/SEN-000004/MQ-2.pdf&quot; target=&quot;_blank&quot;&gt;datasheet&lt;/a&gt; )&lt;br /&gt;
-Buzzer de 5v&lt;br /&gt;
-1Led&lt;br /&gt;
-Fio&lt;br /&gt;
-Arduino&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Imagens:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF8WF8odtWD7LgjiC5lWU0cMaDi278Wz4LzZmr9q3gbYoa2aq0i1bn__GmhHHZIWpFr7N0ZHDm7Rv-nnZamSaUl3JRPOWmycCFz7I3jwndkSjCQ2gpcoommSKrDNezQnhRfxGyykgMeSaG/s1600/IMG_1473.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF8WF8odtWD7LgjiC5lWU0cMaDi278Wz4LzZmr9q3gbYoa2aq0i1bn__GmhHHZIWpFr7N0ZHDm7Rv-nnZamSaUl3JRPOWmycCFz7I3jwndkSjCQ2gpcoommSKrDNezQnhRfxGyykgMeSaG/s400/IMG_1473.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Vídeo:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/ixEQ3NR9DPA?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Código:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;int mq2 = A0; &amp;nbsp; //defenir o pino analógico&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;int val = 0; &amp;nbsp;// criação da variável para armazenar o estado do sensor de gás&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void setup()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; pinMode(13,OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; pinMode(12,OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Serial.begin(9600);//processo para a comunicação serial&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void loop() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; val = analogRead(mq2); //linha de código para armazenar os valores obtidos do sensor de gas &amp;nbsp;na &amp;nbsp;variável inteira &amp;nbsp;&quot;Val&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;Serial.println(val);//envia o valor armazenado na variável &quot;val&quot; para a porta serial&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;delay(1000);//intervalo de tempo de 1 segundo&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;if (val &amp;gt;= 800) {// se os valores obtidos e armazenados na variavel val forem maiores ou iguais a 800 então irá ser activado o buzzer por 3 segundos, e será ligado o led do pino 13&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;digitalWrite(13,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;tone(12,2999,3000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;delay(1000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;if (val &amp;lt; 800) {// se os valores obtidos e armazenados na variavel val forem menores que 800 então o led do pino 13 apaga-se&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;digitalWrite(13,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;delay(1000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
Cumprimentos Rui Marinho!&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/4068966117462139445/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/projecto-arduino-detector-de-gas.html#comment-form' title='11 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4068966117462139445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4068966117462139445'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/projecto-arduino-detector-de-gas.html' title='Projecto arduino -  Detector de gás'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF8WF8odtWD7LgjiC5lWU0cMaDi278Wz4LzZmr9q3gbYoa2aq0i1bn__GmhHHZIWpFr7N0ZHDm7Rv-nnZamSaUl3JRPOWmycCFz7I3jwndkSjCQ2gpcoommSKrDNezQnhRfxGyykgMeSaG/s72-c/IMG_1473.JPG" height="72" width="72"/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-1700064637343933727</id><published>2012-02-23T00:45:00.002+00:00</published><updated>2012-11-20T00:11:56.552+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tracker Solar arduino project Ppantilt servo control ldr"/><title type='text'>Projecto arduino - Tracker solar</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
Boas Pessoal!&lt;br /&gt;
Hoje&amp;nbsp;trago-vos&amp;nbsp;mais um projecto, desta vês um &quot;tracker solar&quot;.Este é&amp;nbsp;constituído&amp;nbsp;por um estrutura &quot;pan tilt&quot; com 2 Servos, &amp;nbsp;temos a base onde está o arduino e bread-board,4 ldrs e claro um painel solar. Basicamente o que isto faz é comparar os valores entre os quatro ldrs e virar o painel solar para a parte onde etsá a ser recebida mais luz.&lt;br /&gt;
Abaixo segue &amp;nbsp;o material utilizado, &amp;nbsp;imagens do projecto,um vídeo do tracker solar em funcionamento, esquemático de ligações e ainda o código em arduino.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Material utilizado:&lt;/b&gt;&lt;br /&gt;
-Pan-Tilt com 2 servos&lt;br /&gt;
-Estrutura em metal&lt;br /&gt;
-Uma bread board&lt;br /&gt;
-Um arduino&lt;br /&gt;
-4 Ldrs&lt;br /&gt;
-4Resistências de 10Kohms&lt;br /&gt;
-1Painel solar&lt;br /&gt;
-Parafusos&lt;br /&gt;
-Um pouco de cola quente&lt;br /&gt;
-Fio&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Imagens&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiaK4jhTdlhKRk5pMZIrc2G0c7Ot2WalJro10dfWN_9a5oVC6boT_gxc4Vqf_Yx8eP3K5pYHBo5dqYYHydZggHdxmaJcAakLqWj5umiSI92hsQ9mm-Ghyk83n1DQGzk_EnCHIKmj4ZwM3d/s1600/IMG_1466.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; display: inline !important; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiaK4jhTdlhKRk5pMZIrc2G0c7Ot2WalJro10dfWN_9a5oVC6boT_gxc4Vqf_Yx8eP3K5pYHBo5dqYYHydZggHdxmaJcAakLqWj5umiSI92hsQ9mm-Ghyk83n1DQGzk_EnCHIKmj4ZwM3d/s200/IMG_1466.JPG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg30E-e257Fb3LedXQR-G4rzW1XDVDMVJjC9QBvVB8IUegxnF7M3S0cI0rz3THpdM04PO9V09lJaI0Ni644YduzM4iXQYKhAqDB3R42vuqRmt5zRp5lXB4ssFGNe3dvxd_TvPuwgMtt6Gbv/s1600/IMG_1470.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg30E-e257Fb3LedXQR-G4rzW1XDVDMVJjC9QBvVB8IUegxnF7M3S0cI0rz3THpdM04PO9V09lJaI0Ni644YduzM4iXQYKhAqDB3R42vuqRmt5zRp5lXB4ssFGNe3dvxd_TvPuwgMtt6Gbv/s200/IMG_1470.JPG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijY6-eL1EO8Qj1KcBP4ej0IsoKhcGzOHy2pxaaKJR7dGIDa8GQEw8SuTqyXoArymhWKO3-sVO0HWaZdLA-PgOGTQFihoCph2PV8qWmK_nf6mwm3KUL9NX0OAVkCmGyZomm8WU-l4rfDx5I/s1600/IMG_1465.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijY6-eL1EO8Qj1KcBP4ej0IsoKhcGzOHy2pxaaKJR7dGIDa8GQEw8SuTqyXoArymhWKO3-sVO0HWaZdLA-PgOGTQFihoCph2PV8qWmK_nf6mwm3KUL9NX0OAVkCmGyZomm8WU-l4rfDx5I/s200/IMG_1465.JPG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaNditNiYjuft_yxQ4KoFT-doZlOO6FRqlHx2IC5l0Vq3bJrRrjFkAaQuLUueWi9GrXRvixGD3Wv_ouzHbSi4UbwwtTaD1YNFb4TbeNXxKLHs6VP9p9CTAkLesSynoMPjh4qR4KV8WMItO/s1600/IMG_1468.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaNditNiYjuft_yxQ4KoFT-doZlOO6FRqlHx2IC5l0Vq3bJrRrjFkAaQuLUueWi9GrXRvixGD3Wv_ouzHbSi4UbwwtTaD1YNFb4TbeNXxKLHs6VP9p9CTAkLesSynoMPjh4qR4KV8WMItO/s200/IMG_1468.JPG&quot; width=&quot;200&quot; /&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;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO-58uuRzc6rTdfWqN9haxOw2_9bK-1hoQLNq5oiSdXbRYw5MWmYW5CKWjCTNemX9qpVD2ZjyZcLmurw4hABCwMeYyKjZID6NP3MJB-4LxaPoUObTqVIqQ_u1HjwDK_dY8H4Qm-Fcjd311/s1600/Capturar.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO-58uuRzc6rTdfWqN9haxOw2_9bK-1hoQLNq5oiSdXbRYw5MWmYW5CKWjCTNemX9qpVD2ZjyZcLmurw4hABCwMeYyKjZID6NP3MJB-4LxaPoUObTqVIqQ_u1HjwDK_dY8H4Qm-Fcjd311/s400/Capturar.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;Vídeo:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/l9LLAf8t-Tg?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Código:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
---------------&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
#define LedPin1 4 &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
#define LedPin2 5&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; #include &amp;lt;Servo.h&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; Servo myservo;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int pos = 0; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int inputesquerda = A1;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int inputdireita = A0;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int esquerda = 0;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int direita = 0;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; Servo myservo2;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int pos2 = 0;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int inputcima = A2;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int inputbaixo = A3;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int ldr = A5&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int tldr = 0&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int cima &amp;nbsp;= 0;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; int baixo = 0;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; void setup()&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; myservo.attach(9);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; myservo2.attach(10);&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; void loop()&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; pinMode(LedPin1, OUTPUT); &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
pinMode(LedPin2, OUTPUT);&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; Left = analogRead(inputesquerda);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; Right = analogRead(inputdireita);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; tldr = analogRead(ldr);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; if (esquerda &amp;gt; (direita +20))&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; if (pos &amp;lt; 179)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; pos++;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; myservo.write(pos);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;if(tldr&amp;gt;512){&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp;digitalWrite(LedPin1,HIGH);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp;digitalWrite(LedPin2,HIGH);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;else{&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; digitalWrite(LedPin1,LOW);&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp;digitalWrite(LedPin2,LOW);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp;}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; if (direita &amp;gt; (esquerda +20))&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; if (pos &amp;gt; 1)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; pos -= 1;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; myservo.write(pos);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; delay(10);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; cima = analogRead(inputcima);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; baixo = analogRead(inputbaixo);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; if (cima &amp;gt; (baixo +20))&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; if (pos2 &amp;lt; 179)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; pos2++;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; myservo2.write(pos2);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; if (baixo &amp;gt; (cima +20))&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; if (pos2 &amp;gt; 1)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; pos2 -= 1;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; myservo2.write(pos2);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; delay(10);&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
-----------------------&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
NOTA: CÓDIGO NÃO TESTADO, É FAVOR DE AVISAREM CASO ESTE ESTEJA MAL FEITO&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;
&lt;/b&gt;
&lt;b&gt;
&lt;/b&gt;
Cumprimentos Rui Marinho !</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/1700064637343933727/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/projecto-arduino-tracker-solar.html#comment-form' title='52 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/1700064637343933727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/1700064637343933727'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/projecto-arduino-tracker-solar.html' title='Projecto arduino - Tracker solar'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiaK4jhTdlhKRk5pMZIrc2G0c7Ot2WalJro10dfWN_9a5oVC6boT_gxc4Vqf_Yx8eP3K5pYHBo5dqYYHydZggHdxmaJcAakLqWj5umiSI92hsQ9mm-Ghyk83n1DQGzk_EnCHIKmj4ZwM3d/s72-c/IMG_1466.JPG" height="72" width="72"/><thr:total>52</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-5536538877797051285</id><published>2012-02-16T11:09:00.001+00:00</published><updated>2012-02-16T11:09:47.671+00:00</updated><title type='text'>Livro de introdução ao Arduino</title><content type='html'>Boas pessoal!&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ordemnatural.com.br/Cartilha%20do%20ARDUINO.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://www.ordemnatural.com.br/Cartilha%20do%20ARDUINO.jpg&quot; width=&quot;266&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Hoje venho aqui partilhar um livro que achei na&amp;nbsp;Internet, este livro é&amp;nbsp;direccionado&amp;nbsp;a quem é iniciante na ferramenta Arduino, e o seu conteúdo é realmente muito bom, pois neste livro podem ver tudo aquilo que necessitam para iniciar a programação em Arduino e todos os seus conceitos básicos.&lt;br /&gt;
Abaixo deixo o link ara o download e a fonte de origem do livro:&lt;br /&gt;
Para fazer o download do livro &lt;a href=&quot;https://www.dropbox.com/s/5b0smnazrjy6lut/CartilhadoArduino_ed10.pdf&quot; target=&quot;_blank&quot;&gt;clique aqui&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Para mais informações acerca deste livro:&amp;nbsp;&lt;a href=&quot;http://www.ordemnatural.com.br/&quot;&gt;http://www.ordemnatural.com.br/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/5536538877797051285/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/livro-de-introducao-ao-arduino.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/5536538877797051285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/5536538877797051285'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/livro-de-introducao-ao-arduino.html' title='Livro de introdução ao Arduino'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-5380448676781402654</id><published>2012-02-12T18:41:00.002+00:00</published><updated>2012-02-13T12:18:30.674+00:00</updated><title type='text'>mini-bot v 1.0</title><content type='html'>&lt;br /&gt;
Boas!&lt;br /&gt;
Hoje vou apresentar aqui um projecto ao qual vai ser dada continuidade daqui para a frente.Para já ficam com a primeira versão do projeto.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Vídeo:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/qjW6jLcdDys?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Imagens:&lt;/b&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;&lt;img height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-_sp7tXkyPOLTJx6waJ3l-p9nWkK2aSl5W0YSv8DmxTSXlU1GnigJuQv5NZNFuRhRJLbn790PvDIsrFv8ODVWkDA-WhVLjWbEvOHFBkv0YBVURFUf_YFlUH3q_5DkZmZ6v3Je8gWiy0c/s320/Controlo+motores.JPG&quot; width=&quot;320&quot; /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVd4xUXyuEHhZG_VD9f7wJuLNXzwOHqKLhCqsPlJU57O41waXIJjlErt_eyoBdIwN9xMg7mk4rdk7G9t1cx7Tl9sOs21QAtabrJE8xqzCGDbbSviBi49QWWi-GwHKChVSqlC7du2ECmixy/s1600/12022012370.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVd4xUXyuEHhZG_VD9f7wJuLNXzwOHqKLhCqsPlJU57O41waXIJjlErt_eyoBdIwN9xMg7mk4rdk7G9t1cx7Tl9sOs21QAtabrJE8xqzCGDbbSviBi49QWWi-GwHKChVSqlC7du2ECmixy/s320/12022012370.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi898bxckiQ8Ufd48225xXhhKtGWlO4OpbhBUijW69Ue8QfsCBhz2fiRcCrjXw1HWtIcJBD6jAyitUjFM2815udhRtW-jIHzYj4jH0bX3PONzrtbSdsyUjXKDX0CZtM0POwfvc8peYI0kOu/s1600/12022012372.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi898bxckiQ8Ufd48225xXhhKtGWlO4OpbhBUijW69Ue8QfsCBhz2fiRcCrjXw1HWtIcJBD6jAyitUjFM2815udhRtW-jIHzYj4jH0bX3PONzrtbSdsyUjXKDX0CZtM0POwfvc8peYI0kOu/s320/12022012372.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipbGHCfRx9sZYe6xzAi0pGllruWlYxoQaRfLWi3M2WEYbYykN0IJZK592PPOhr8GIz4i2cQ8g4m2R-D5CqAsPlM1O98MpZumeSENnmypDr-qBXopNA5NVgPN__WnYZpXYjh8hc6UuYDGqu/s1600/12022012375.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipbGHCfRx9sZYe6xzAi0pGllruWlYxoQaRfLWi3M2WEYbYykN0IJZK592PPOhr8GIz4i2cQ8g4m2R-D5CqAsPlM1O98MpZumeSENnmypDr-qBXopNA5NVgPN__WnYZpXYjh8hc6UuYDGqu/s320/12022012375.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Código em arduino:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void setup()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Serial.begin(9600);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
pinMode(13, OUTPUT);//motor frente&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
pinMode(12, OUTPUT);//motor da frente&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
pinMode(11, OUTPUT);//pwm motor da frente&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
pinMode(10, OUTPUT);//pwm motor de traz&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
pinMode(9, OUTPUT);//motor de tras&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
pinMode(8, OUTPUT);//motor de tras&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void loop( ){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;char x = Serial.read();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; if (x==&#39;a&#39;){//avançar&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(13,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(12,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; analogWrite(11,200);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Serial.print(&#39;a recebido&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; if (x==&#39;b&#39;){//recuar&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(13,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(12,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; analogWrite(11,200);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Serial.print(&#39;b recebido&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (x==&#39;c&#39;){//virar a esquerda&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(9,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(8,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; analogWrite(10,200);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Serial.print(&#39;c esquerda&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; if (x==&#39;d&#39;){//virar a direita&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(9,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(8,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; analogWrite(10,200);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Serial.print(&#39;d direita&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; if (x==&#39;e&#39;){//para parar&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;analogWrite(11,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(13,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(12,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; analogWrite(9,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(8,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(10,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; Serial.print(&#39;e parado&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;-------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Download do programa em visual basic:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://dl.dropbox.com/u/50854449/mini-robot%20v%201.0.rar&quot;&gt;http://dl.dropbox.com/u/50854449/mini-robot%20v%201.0.rar&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Para saberem mais sobre comunicação Vb arduino visitem :&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;a href=&quot;http://engenhocas4you.wordpress.com/&quot;&gt;http://engenhocas4you.wordpress.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Espero que gostem!&lt;br /&gt;
Cumprimentos Rui Marinho!</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/5380448676781402654/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/mini-bot-v-10.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/5380448676781402654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/5380448676781402654'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/mini-bot-v-10.html' title='mini-bot v 1.0'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-_sp7tXkyPOLTJx6waJ3l-p9nWkK2aSl5W0YSv8DmxTSXlU1GnigJuQv5NZNFuRhRJLbn790PvDIsrFv8ODVWkDA-WhVLjWbEvOHFBkv0YBVURFUf_YFlUH3q_5DkZmZ6v3Je8gWiy0c/s72-c/Controlo+motores.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-3871162759202156952</id><published>2012-02-10T21:33:00.005+00:00</published><updated>2012-02-13T12:22:08.452+00:00</updated><title type='text'>Sensor CNY70 + arduino</title><content type='html'>&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Boas pessoal&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt; line-height: 115%;&quot;&gt;&amp;nbsp;Neste post vamos ver como funciona o sensor CNY70( sensor de infravermelhos) este sensor tanto pode fornecer valores &amp;nbsp;analógicos como digitais mas neste post só esta a fornecer valores digitais (0,1)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; line-height: 115%;&quot;&gt;&lt;b&gt;Esquema de montagem:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; line-height: 115%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRJj08zMGklTSOpDyrkW2PmncAx2S_6iOweOmyd-zDXb981mBr3mA5I7n-zl6Z5rh2FJQmZk8Ip2ms3x_gKlIPrJtA9QL-psi2ozBYnk8sw4OxtWbsIzCuMh3kRb-ftMp7vlvl2NdNSdU/s1600/CNY70.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5707627501136418546&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRJj08zMGklTSOpDyrkW2PmncAx2S_6iOweOmyd-zDXb981mBr3mA5I7n-zl6Z5rh2FJQmZk8Ip2ms3x_gKlIPrJtA9QL-psi2ozBYnk8sw4OxtWbsIzCuMh3kRb-ftMp7vlvl2NdNSdU/s320/CNY70.JPG&quot; style=&quot;display: block; height: 124px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Codigo em arduino&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
---------------------------------------&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
int inPin = 4; // pino 4&lt;/div&gt;
&lt;div&gt;
int valor = 0; // &lt;/div&gt;
&lt;div&gt;
void setup() {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Serial.begin(9600);&lt;/div&gt;
&lt;div&gt;
pinMode(inPin, INPUT);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
void loop() {&lt;/div&gt;
&lt;div&gt;
valor = digitalRead(inPin); //guardar valor lido na variavel valor&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Serial.println(valor);//mostra o valor lido no serial monitor&lt;/div&gt;
&lt;div&gt;
delay (500);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
-----------------------------------------&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
Imagens da placa de circuito impresso&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjstdLu0WGbGA83XBzAIwXoTbDq-duItDR7LevWklGFfTyGCrm7FYu-8Br22KMz2YqX1TDNietRD_Km3FN5WXQeLRSLbDx-iP4wjAopILXFPClttAvgd5BNWRfis49Ke-xZxVzBHWg_Fd4/s1600/P270112_17.020003.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5707627267589105650&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjstdLu0WGbGA83XBzAIwXoTbDq-duItDR7LevWklGFfTyGCrm7FYu-8Br22KMz2YqX1TDNietRD_Km3FN5WXQeLRSLbDx-iP4wjAopILXFPClttAvgd5BNWRfis49Ke-xZxVzBHWg_Fd4/s320/P270112_17.020003.JPG&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd_E-CkHC-WdGVYLRUnojAy2Q67gHefg2hjEOgpTK_ImCxRG53gP_17vfCr9GhIXis4T9CwjPM3Pmyqzw48AKLBArva23mHBCaqX4Ax2hzhUFR4gJ0N3T_F9Mj294seRNUU3ztiDbvS8c/s1600/P270112_17.030001.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5707627262524512450&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd_E-CkHC-WdGVYLRUnojAy2Q67gHefg2hjEOgpTK_ImCxRG53gP_17vfCr9GhIXis4T9CwjPM3Pmyqzw48AKLBArva23mHBCaqX4Ax2hzhUFR4gJ0N3T_F9Mj294seRNUU3ztiDbvS8c/s320/P270112_17.030001.JPG&quot; style=&quot;cursor: pointer; display: block; height: 240px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: left; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Links:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://html.alldatasheet.com/html-pdf/26332/VISHAY/CNY70/179/1/CNY70.html&quot;&gt;Datacheet- CNY70&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Comprimentos Marco Joel&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/3871162759202156952/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/sensor-cny70-arduino.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3871162759202156952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/3871162759202156952'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/sensor-cny70-arduino.html' title='Sensor CNY70 + arduino'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03996237044039086130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRJj08zMGklTSOpDyrkW2PmncAx2S_6iOweOmyd-zDXb981mBr3mA5I7n-zl6Z5rh2FJQmZk8Ip2ms3x_gKlIPrJtA9QL-psi2ozBYnk8sw4OxtWbsIzCuMh3kRb-ftMp7vlvl2NdNSdU/s72-c/CNY70.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-5470783445230581737</id><published>2012-02-07T23:26:00.001+00:00</published><updated>2012-02-09T20:34:37.404+00:00</updated><title type='text'>Buzzer + Arduino</title><content type='html'>Boas!&lt;br /&gt;
Hoje vou fazer um simples&amp;nbsp;tutorial&amp;nbsp;de como ligar um buzzer &amp;nbsp;ao arduino.&lt;br /&gt;
Neste tutorial estou a usar uma nova função no arduino, com o nome de &quot;tone&quot;( em&amp;nbsp;português&amp;nbsp;tom)&amp;nbsp;basicamente&amp;nbsp;o que esta função faz é dar a frequência &amp;nbsp;que o buzzer irá&amp;nbsp;emitir&amp;nbsp;para assim formar um determinado som, muito simples.&lt;br /&gt;
Abaixo &amp;nbsp;segue o código de arduino com&amp;nbsp;esquema&amp;nbsp; de ligação do buzzer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Esquema:~&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkmXFbQGCl8I4nF9xOU9dS3jThnJ_yLbfY_XYk0MCEFfzk9C0Ox3NIfRXzJfyFQdxaBTZHqfgVYjv_Qa4STG-AM-pwNpSPuaSyFtmyemPEWqqpd7yontSWLc7RDtk8L4xv-uVHh1qxTLuN/s1600/buzze.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkmXFbQGCl8I4nF9xOU9dS3jThnJ_yLbfY_XYk0MCEFfzk9C0Ox3NIfRXzJfyFQdxaBTZHqfgVYjv_Qa4STG-AM-pwNpSPuaSyFtmyemPEWqqpd7yontSWLc7RDtk8L4xv-uVHh1qxTLuN/s400/buzze.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Código:&lt;/b&gt;&lt;br /&gt;
------------------------------------------------&lt;br /&gt;
&amp;nbsp;void setup(){&lt;br /&gt;
pinMode(13,OUTPUT);//define o pino 13 do arduino como saida digital&lt;br /&gt;
}&lt;br /&gt;
void loop(){&lt;br /&gt;
//play tone&lt;br /&gt;
tone(13,2999,800);// esta linha de código é usada especialmente para o buzzer&lt;br /&gt;
//O seu funcionamento é : o pino, a frequência e o tempo de duração em&amp;nbsp;milissegundos&lt;br /&gt;
//delay (ms)&lt;br /&gt;
delay(1000);&lt;br /&gt;
}&lt;br /&gt;
---------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Espero que gostem, cumprimentos Rui Marinho!</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/5470783445230581737/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/buzzer-arduino.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/5470783445230581737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/5470783445230581737'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/buzzer-arduino.html' title='Buzzer + Arduino'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkmXFbQGCl8I4nF9xOU9dS3jThnJ_yLbfY_XYk0MCEFfzk9C0Ox3NIfRXzJfyFQdxaBTZHqfgVYjv_Qa4STG-AM-pwNpSPuaSyFtmyemPEWqqpd7yontSWLc7RDtk8L4xv-uVHh1qxTLuN/s72-c/buzze.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-591663198573203361</id><published>2012-02-03T19:05:00.005+00:00</published><updated>2012-02-20T14:59:07.606+00:00</updated><title type='text'>Controlo Motores L293D+ Arduino &quot;Versão 2&quot;</title><content type='html'>&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &lt;/span&gt;Boas&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &lt;/span&gt;Aqui fica a 2 versão do controlo de motores com o L293D, este já com vídeo e com a placa em eagle, também com umas pequenas alterações no código, irão reparar de imediato quendo olharem para o código.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;height: 64px; margin-left: 262px; margin-top: 460px; position: absolute; width: 33px; z-index: 251682816;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;height: 124px; margin-left: 194px; margin-top: 449px; position: absolute; width: 280px; z-index: 251680768;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;height: 69px; margin-left: 325px; margin-top: 446px; position: absolute; width: 16px; z-index: 251684864;&quot;&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;Já agora o PWM é uma abreviatura de (
&lt;span style=&quot;background-color: #fff9e7; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; text-align: -webkit-left;&quot;&gt;&amp;nbsp;Pulse Width Modulation&lt;/span&gt;&amp;nbsp;), serve para podermos controlar a velocidade de um motor de 0-255&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Esquema de Montagem&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-_sp7tXkyPOLTJx6waJ3l-p9nWkK2aSl5W0YSv8DmxTSXlU1GnigJuQv5NZNFuRhRJLbn790PvDIsrFv8ODVWkDA-WhVLjWbEvOHFBkv0YBVURFUf_YFlUH3q_5DkZmZ6v3Je8gWiy0c/s1600/Controlo+motores.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5708361402755100322&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-_sp7tXkyPOLTJx6waJ3l-p9nWkK2aSl5W0YSv8DmxTSXlU1GnigJuQv5NZNFuRhRJLbn790PvDIsrFv8ODVWkDA-WhVLjWbEvOHFBkv0YBVURFUf_YFlUH3q_5DkZmZ6v3Je8gWiy0c/s320/Controlo+motores.JPG&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 254px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&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;/div&gt;
&lt;div&gt;
&lt;div&gt;
Manual da Placa de circuito impresso&lt;/div&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYkHpplTLir1x9W2LJMI341JjTSh-pPf3WxXqCEovECOFomXbRM6XGpGqBqO_W5XYPlM-6zsmz8fCh7kxJnNBqQ4BqfNWMnednqs4ix6dv8auFmKRdrFYuhYlc9lZWXf4j4LJ-SWM7WfA/s1600/PLaca+instru%25C3%25A7%25C3%25B5es.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5704988299305642914&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYkHpplTLir1x9W2LJMI341JjTSh-pPf3WxXqCEovECOFomXbRM6XGpGqBqO_W5XYPlM-6zsmz8fCh7kxJnNBqQ4BqfNWMnednqs4ix6dv8auFmKRdrFYuhYlc9lZWXf4j4LJ-SWM7WfA/s320/PLaca+instru%25C3%25A7%25C3%25B5es.JPG&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 298px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Imagens da placa de circito impresso&lt;/div&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHvKHp_xWDg7oZFcucCoou3SwTTf0JAmZ2762VjdXPBXT_vXSbaFegdOkuyhjBFIkn3vo0oxLBdO84faTp3pZs28bej7NaDeJ_pOTs2l1ValLeFVKGK28LKdZ9VkV-TPeNczL9YZMo1Xo/s1600/P030212_17.410003.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5704987858905911106&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHvKHp_xWDg7oZFcucCoou3SwTTf0JAmZ2762VjdXPBXT_vXSbaFegdOkuyhjBFIkn3vo0oxLBdO84faTp3pZs28bej7NaDeJ_pOTs2l1ValLeFVKGK28LKdZ9VkV-TPeNczL9YZMo1Xo/s200/P030212_17.410003.JPG&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 150px; margin: 0px auto 10px; text-align: center; width: 200px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLFyz2lGrr9mJMgoev3KCMbUu2RYG-8m_j8Z3Idz0kPk_YDiKd18dSmQ38UEqwP52Habpp4mL-v15H5gMG-3SRA5za4fg50zAe2RoEODON5B_gX8vjGjbVaTlL7-yKPsMdGx-Q0gpWD-s/s1600/P030212_17.410002.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5704987849895844914&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLFyz2lGrr9mJMgoev3KCMbUu2RYG-8m_j8Z3Idz0kPk_YDiKd18dSmQ38UEqwP52Habpp4mL-v15H5gMG-3SRA5za4fg50zAe2RoEODON5B_gX8vjGjbVaTlL7-yKPsMdGx-Q0gpWD-s/s200/P030212_17.410002.JPG&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 150px; margin: 0px auto 10px; text-align: center; width: 200px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Tp-IOJzpFpOhy64JDmeyVKXXZqH4Xd6RU15H-ieBoCvPd4hDHXt3aHq_kBnMfd3z8zx3ZZkeuEaCcsou4MzHZK0o4lqQifMbvAw50dRXIgTqXKe49qh3cnSNmph325eV8nyhrHI_JbI/s1600/P030212_17.410001.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5704987846458254338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Tp-IOJzpFpOhy64JDmeyVKXXZqH4Xd6RU15H-ieBoCvPd4hDHXt3aHq_kBnMfd3z8zx3ZZkeuEaCcsou4MzHZK0o4lqQifMbvAw50dRXIgTqXKe49qh3cnSNmph325eV8nyhrHI_JbI/s200/P030212_17.410001.JPG&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 150px; margin: 0px auto 10px; text-align: center; width: 200px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
Esta placa pode ser colucada em cima do arduino.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Código&lt;/div&gt;
&lt;div&gt;
-----------------------------------------&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
void setup()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
Serial.begin(9600);&lt;/div&gt;
&lt;div&gt;
pinMode(13, OUTPUT);&lt;/div&gt;
&lt;div&gt;
pinMode(12, OUTPUT);&lt;/div&gt;
&lt;div&gt;
pinMode(11, OUTPUT);&lt;/div&gt;
&lt;div&gt;
pinMode(10, OUTPUT);&lt;/div&gt;
&lt;div&gt;
pinMode(9, OUTPUT);&lt;/div&gt;
&lt;div&gt;
pinMode(8, OUTPUT);&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
void loop()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,1); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,0); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,0); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,1);//Motor 2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,50); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,50); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
delay (2000);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,HIGH); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,LOW); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,HIGH); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,LOW);//Motor 2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,50); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,50); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
delay (2000);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,0); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,1); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,0); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,0);//Motor 2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,50); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,50); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
delay (2000);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,1); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,0); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,0); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,0);//Motore2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,20); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,100); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
delay (2000);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,LOW); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,HIGH); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,LOW); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,LOW);//Motor 2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,100); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,20); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
-----------------------------------------&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Links&lt;br /&gt;
&lt;div&gt;
Videos&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://youtu.be/I6wUXVf6Hgo&quot;&gt;Videos da demonstração do circuito em funciunamento.&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://youtu.be/pUTDMneQURc&quot;&gt;Video da demonstração da placa de circuito impresso.&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
Placa em eagle&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;              &lt;/span&gt;&lt;a href=&quot;http://dl.dropbox.com/u/59720640/Artduino%20%2B%20L293%20com%20alimeta%C3%A7%C3%A3o%20%2B%20pwm.rar&quot;&gt;Download aqui placa eagle&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;        Datasheet do drive L293D:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;http://pdf1.alldatasheet.com/datasheet-pdf/view/27189/TI/L293D.html&quot;&gt;http://pdf1.alldatasheet.com/datasheet-pdf/view/27189/TI/L293D.html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
Comprimentos Marco Joel&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/591663198573203361/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/controlo-motores-l293d-arduino-versao-2_03.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/591663198573203361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/591663198573203361'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/controlo-motores-l293d-arduino-versao-2_03.html' title='Controlo Motores L293D+ Arduino &quot;Versão 2&quot;'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03996237044039086130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-_sp7tXkyPOLTJx6waJ3l-p9nWkK2aSl5W0YSv8DmxTSXlU1GnigJuQv5NZNFuRhRJLbn790PvDIsrFv8ODVWkDA-WhVLjWbEvOHFBkv0YBVURFUf_YFlUH3q_5DkZmZ6v3Je8gWiy0c/s72-c/Controlo+motores.JPG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-4909480128150115037</id><published>2012-02-02T21:19:00.003+00:00</published><updated>2012-02-02T22:56:30.071+00:00</updated><title type='text'>Controlo Motores L293D+ Arduino</title><content type='html'>&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Boas&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-size: 12pt; line-height: 18px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size: 12pt; line-height: 18px;&quot;&gt;Com este esquema representado a baixo, podemos fazer o controlo de 2 motores DC, este código em arduino consiste em &amp;nbsp; fazer com que os motores andem para a frente 2 seg. a uma certa velocidade, mais 2 seg. a outra velocidade e assim sucessivamente.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 18px;&quot;&gt;Os materiais necessários são:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1 Drive L293D, para controlo dos motores&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;2 Motores DC&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1 Arduino&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Fios de ligação&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1 Breadboard&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;Esquema de Ligação:&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiIsGNC0DG6xflFaz0n48Pax4L1xGTqEf4fu3Z5eaKL5pvHGYZcWzgupn7MpXe3kgfr71eqmZWWArJTAr4SheXOSOND0UX2I5He3n7MSY53QxK93mji1eX4PHBMRQvOB7ZxdKxWnceayg/s1600/Controlo+motores.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5704651103455615986&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiIsGNC0DG6xflFaz0n48Pax4L1xGTqEf4fu3Z5eaKL5pvHGYZcWzgupn7MpXe3kgfr71eqmZWWArJTAr4SheXOSOND0UX2I5He3n7MSY53QxK93mji1eX4PHBMRQvOB7ZxdKxWnceayg/s320/Controlo+motores.JPG&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 315px; margin: 0px auto 10px; text-align: center; width: 320px;&quot; /&gt;&lt;/a&gt;&lt;b&gt;Código:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
-----------------------------------------&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
void setup()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
Serial.begin(9600);&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
void loop()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,HIGH); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,LOW); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,HIGH); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,LOW);//Motor 2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,50); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,50); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
delay (2000);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,LOW); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,LOW); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,HIGH); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,LOW);//Motor 2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,50); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,50); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
delay (2000);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,LOW); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,HIGH); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,LOW); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,LOW);//Motor 2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,50); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,50); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
delay (2000);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,HIGH); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,LOW); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,HIGH); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,LOW);//Motore2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,20); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,100); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
delay (2000);&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(13,LOW); //Motor 1&lt;/div&gt;
&lt;div&gt;
digitalWrite(12,HIGH); //Motor 1&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
digitalWrite(9,LOW); //Motor 2&lt;/div&gt;
&lt;div&gt;
digitalWrite(8,LOW);//Motor 2&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
analogWrite(11,100); //Motor 1 PWM&lt;/div&gt;
&lt;div&gt;
analogWrite(10,20); //Motor 2 PWM&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
----------------------------------------&lt;/div&gt;
&lt;div&gt;
Nota: &lt;span style=&quot;font-size: 12pt; text-align: justify;&quot;&gt;Mais para a frente irei actualizar este post com uma placa em EAGLE, e com um vídeo &amp;nbsp;do drive e dos motores em funcionamento.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&quot;Eagle Cad Soft&quot;&amp;nbsp;&lt;/i&gt;é um programa em que se desenha o esquema do circuito com os seus devidos componentes &amp;nbsp;e que depois com uma função automatica do EAGLE cria as pistas automaticamente numa face ou em dupla face, depois imprime-se as pistas para acetato e segue-se o devido procedimento para passar as pistas para as placas pcb.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 12pt; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 12pt; text-align: justify;&quot;&gt;Fica aqui uma imagem da a placa em EAGLE, esta placa pode ser encaixada no arduino uno ou mega:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 12pt; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcH2-JohpwaN1mIUj4cGyKRNZVWUB1POkNkhJumb9ckAD2DlHu_SaKGGVfOzocG8QWpTU8fHkhIIdmginGeUpuzmDKh3qMJo1WHQ_CdSnrIe29SccQFkJbswqUB8jt9a8eJAdNwvaT9ds/s1600/placa+motores.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5704651012053014530&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcH2-JohpwaN1mIUj4cGyKRNZVWUB1POkNkhJumb9ckAD2DlHu_SaKGGVfOzocG8QWpTU8fHkhIIdmginGeUpuzmDKh3qMJo1WHQ_CdSnrIe29SccQFkJbswqUB8jt9a8eJAdNwvaT9ds/s320/placa+motores.JPG&quot; style=&quot;cursor: hand; cursor: pointer; display: block; height: 297px; margin: 0px auto 10px; text-align: center; width: 237px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 12pt; text-align: justify;&quot;&gt;&lt;b&gt;LINK´s:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Datasheet do drive L293D:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;http://pdf1.alldatasheet.com/datasheet-pdf/view/27189/TI/L293D.html&quot;&gt;http://pdf1.alldatasheet.com/datasheet-pdf/view/27189/TI/L293D.html&lt;/a&gt;&lt;br /&gt;
Site do &quot;EAGLE CadSoft&quot;:&lt;br /&gt;
&lt;a href=&quot;http://www.cadsoftusa.com/&quot;&gt;http://www.cadsoftusa.com/&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Comprimentos Marco Joel !&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/4909480128150115037/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/controlo-motores-l293d-arduino.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4909480128150115037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/4909480128150115037'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/controlo-motores-l293d-arduino.html' title='Controlo Motores L293D+ Arduino'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03996237044039086130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiIsGNC0DG6xflFaz0n48Pax4L1xGTqEf4fu3Z5eaKL5pvHGYZcWzgupn7MpXe3kgfr71eqmZWWArJTAr4SheXOSOND0UX2I5He3n7MSY53QxK93mji1eX4PHBMRQvOB7ZxdKxWnceayg/s72-c/Controlo+motores.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-343791722986519811</id><published>2012-02-02T18:03:00.000+00:00</published><updated>2012-02-02T18:03:49.262+00:00</updated><title type='text'>Estação de temperatura versão 2</title><content type='html'>Boas!&lt;br /&gt;
Mais um projecto, desta vez é uma estação de temperatura,&amp;nbsp;está-mos&amp;nbsp;já na segunda versão.&lt;br /&gt;
Esta segunda versão&amp;nbsp;sofreu&amp;nbsp;algumas alterações, agora estamos a usar 2 sensores de temperatura para assim obter mais&amp;nbsp;precisão, fizemos também algumas alterações no código... Abaixo&amp;nbsp;deixo-vos&amp;nbsp;com o video do funcionamento do projecto, material utilizado, algumas imagens e &amp;nbsp;esquemático para a ligação ao arduino e é claro o código para o arduino.&lt;br /&gt;
Espero que gostem :D&lt;br /&gt;
&lt;b&gt;Video:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/iciKcuztg4o?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Material utilizado:&lt;/b&gt;&lt;br /&gt;
-Um lcd 16*2&lt;br /&gt;
-2 sensores de&amp;nbsp;temperatura&amp;nbsp;Lm35&lt;br /&gt;
-Um arduino&lt;br /&gt;
-Uma breadboard&lt;br /&gt;
-Fio(quantidade variada&lt;br /&gt;
&lt;b&gt;Imagens:&lt;/b&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrCjTxVPFP0eKyMPjZbzw4eBRSgsHDpOKXDXTe5_JCgtd-D5Csm5oU33Gjz1qEsAEFqL2V_bUbnOLx-R8Gh-yUJzUcJom9n-GiqmbgTP6q1rI6_C0KMrcja_bkKkbNS7fM5yYd4dZZlOM/s1600/P010212_11.580001.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrCjTxVPFP0eKyMPjZbzw4eBRSgsHDpOKXDXTe5_JCgtd-D5Csm5oU33Gjz1qEsAEFqL2V_bUbnOLx-R8Gh-yUJzUcJom9n-GiqmbgTP6q1rI6_C0KMrcja_bkKkbNS7fM5yYd4dZZlOM/s400/P010212_11.580001.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Imagem do projeto&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfICwAn37JtkmpbdAom157pWYohndC3CGNjqPUDdlwbLHORH8KGtmlUlCjRNc6TiGeIhfmsOGWK1UPWDoJJoilY4l1uzU0rASFDQ9qigknnTIPjRHBwzLkpZkYbDO9D8zdK8WvEVyItrAS/s1600/P010212_11.540001.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfICwAn37JtkmpbdAom157pWYohndC3CGNjqPUDdlwbLHORH8KGtmlUlCjRNc6TiGeIhfmsOGWK1UPWDoJJoilY4l1uzU0rASFDQ9qigknnTIPjRHBwzLkpZkYbDO9D8zdK8WvEVyItrAS/s400/P010212_11.540001.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Mais uma imagem do projeto&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Código:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;//biblioteca do lcd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;LiquidCrystal lcd(12, 11, 5, 4, 3, 2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;//Declaração de sensores e variáveis para o armazenamento de valores&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;int SENSOR1 = A0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;int SENSOR2 = A1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;float D1 = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;float T1 = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;float D2 = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;float T2 = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;float media = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;void setup() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;Serial.begin(9600);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.begin(16, 2); //LCD 16x2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.setCursor(0,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(&quot;Estacao de Temp.&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.setCursor(0,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(&quot;Versao 1.0&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;delay(3000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.clear();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;void loop() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;// Cálculos para a conversão da temperatura&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;D1 = analogRead(SENSOR1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;T1 = (D1 * 500)/1024;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;D2 = analogRead(SENSOR2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;T2 = (D2 * 500)/1024;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;media=(T1+T2)/2;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;delay(1000); // atualização dos dados a cada 1 segundo&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.setCursor(0,0);//mudar para a linha de cima&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(&quot;Sensor1 Sensor2&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.setCursor(0,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(T1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(&quot;C&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(&quot; &amp;nbsp;&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(T2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(&quot;C&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;delay(5000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.clear();// apagar tudo que está escrito no lcd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.setCursor(0,0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(&quot;Temp. Media&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.setCursor(0,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(media);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.print(&quot;C&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;delay(3000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;lcd.clear();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
Cumprimentos Rui Marinho !</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/343791722986519811/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/estacao-de-temperatura-versao-2.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/343791722986519811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/343791722986519811'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/estacao-de-temperatura-versao-2.html' title='Estação de temperatura versão 2'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrCjTxVPFP0eKyMPjZbzw4eBRSgsHDpOKXDXTe5_JCgtd-D5Csm5oU33Gjz1qEsAEFqL2V_bUbnOLx-R8Gh-yUJzUcJom9n-GiqmbgTP6q1rI6_C0KMrcja_bkKkbNS7fM5yYd4dZZlOM/s72-c/P010212_11.580001.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-6907486222460743542</id><published>2012-02-02T09:31:00.004+00:00</published><updated>2012-02-02T09:36:36.807+00:00</updated><title type='text'>&quot;Knight Rider&quot; versão 2</title><content type='html'>Boas!&lt;br /&gt;
Hoje&amp;nbsp;trago-vos&amp;nbsp;uma actualização num projecto &quot;Knight Rider&quot;... Nesta versão adicionei um&amp;nbsp;potenciómetro&amp;nbsp;que controla a velocidade com que os leds piscam, existem &amp;nbsp;grandes diferenças em termos de código.&lt;br /&gt;
Abaixo deixo -vos com o esquemático do&amp;nbsp;projeto&amp;nbsp;o video e o código para o arduino:&lt;br /&gt;
&lt;b&gt;Video:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/o13eFfCG518?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Imagens:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqQNGesGpjTO_kW6ipf8pXzqqf6qTMxAYuZsdh1m4W1qXJBzAFFSETR8md4c5fytFpUei_ddi-p8-F04agMnLivJGLJewax59LAFrNyEazDlnRhqUe5Ypiu4sPGLtSe1TP_1TY1jYp_een/s1600/2012-02-01+20.19.31.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqQNGesGpjTO_kW6ipf8pXzqqf6qTMxAYuZsdh1m4W1qXJBzAFFSETR8md4c5fytFpUei_ddi-p8-F04agMnLivJGLJewax59LAFrNyEazDlnRhqUe5Ypiu4sPGLtSe1TP_1TY1jYp_een/s320/2012-02-01+20.19.31.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihwy1uGU2DFlxXXdis8nGnghQFm0xwMcTf9wfzqrjiHQesnLtwY0w26lQEUn5YeZKy3jo5yntI2kr2KmmnDOoC6Mkne850TCeL4YPHVWJK2WSMyYl9oH9bp-1U8RmUM_HT4L7juad9yeDL/s1600/knight+ride+v2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihwy1uGU2DFlxXXdis8nGnghQFm0xwMcTf9wfzqrjiHQesnLtwY0w26lQEUn5YeZKy3jo5yntI2kr2KmmnDOoC6Mkne850TCeL4YPHVWJK2WSMyYl9oH9bp-1U8RmUM_HT4L7juad9yeDL/s320/knight+ride+v2.PNG&quot; width=&quot;264&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;Código:&lt;/b&gt;&lt;/blockquote&gt;
&lt;b&gt;----------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;int pinInicial=7;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;int pinFinal=13;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void setup() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; for(int i=pinInicial;i&amp;lt;=pinFinal;i++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; pinMode(i,OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; pinMode(A0,INPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; for(int i=pinInicial;i&amp;lt;=pinFinal;i++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(i,LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void loop() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; for(int i=pinInicial;i&amp;lt;pinFinal;i++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(i,HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; ledDelay(1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(i+1,HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; ledDelay(2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(i,LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; ledDelay(3);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; for(int i=pinFinal;i&amp;gt;pinInicial;i--)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(i,HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; ledDelay(1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(i-1,HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; ledDelay(2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(i,LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; ledDelay(3);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;int valVelocidad(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; float valorPotenciometro=int(analogRead(A0)/100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; if(valorPotenciometro&amp;lt;0){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; return(0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; else if(valorPotenciometro&amp;gt;9) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; return(9);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; return(valorPotenciometro);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void ledDelay(int d){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; for(int j=0;j&amp;lt;(valVelocidad()*2);j++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; delay(d);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
----------------------------------------------------------------&lt;br /&gt;
Cumprimentos Rui Marinho !&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/6907486222460743542/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/knight-rider-versao-2.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/6907486222460743542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/6907486222460743542'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/knight-rider-versao-2.html' title='&quot;Knight Rider&quot; versão 2'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqQNGesGpjTO_kW6ipf8pXzqqf6qTMxAYuZsdh1m4W1qXJBzAFFSETR8md4c5fytFpUei_ddi-p8-F04agMnLivJGLJewax59LAFrNyEazDlnRhqUe5Ypiu4sPGLtSe1TP_1TY1jYp_een/s72-c/2012-02-01+20.19.31.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5848748962449588903.post-7161356493035307472</id><published>2012-02-01T14:52:00.000+00:00</published><updated>2012-02-01T14:52:52.516+00:00</updated><title type='text'>&quot;knight Rider&quot; - Arduino + 6LEDS</title><content type='html'>Boas!&lt;br /&gt;
&lt;div&gt;
Hoje trago-vos mais um mini projecto desta ves decidi fazer um &quot;Knigh Rider&quot; com a combinação de 6 leds, espero que gostem :D , abaixo deixo o esquemático, material, Código e um video a demonstrar o funcionamento.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Video:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;strike&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/fSPEJ99qA4g?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/strike&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
(desculpem pela má qualidade do video)&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Material utilizado:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;- &lt;/b&gt;Seis Leds;&lt;/div&gt;
&lt;div&gt;
-Seis Resistências de 220ohms;&lt;/div&gt;
&lt;div&gt;
-Uma Breadboard;&lt;/div&gt;
&lt;div&gt;
-Fio(quantidade variada);&lt;/div&gt;
&lt;div&gt;
-Um arduino;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Esquemático:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHcq8yJvK3igG1HvcUTRDK28vOVo8HUfW1k_bx97c55H_PKqHhnxBGeDnycU1lljhiB32e4l6-sdQ4XQ9pbfmkzDW24Ty4EoImp4BSLruJvbN3nutOhS0GVRSMD5zbgV8gN948gpTttWH/s1600/Capturar2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYQZDvcNj7vUjiO7ntkoGtJzmn87QmiFEbJpqe66Eu4dj5ynmsVXyJlMGoYlQ4wwhRDgUDaFKcHca-tMDV3YmuY0vC9auY8IXPEBXBwR4DZ39u4Xi95oP7FGOI2Tjg2vaG-DVctsgGmt5n/s640/2012-02-01%252014.23.58.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYQZDvcNj7vUjiO7ntkoGtJzmn87QmiFEbJpqe66Eu4dj5ynmsVXyJlMGoYlQ4wwhRDgUDaFKcHca-tMDV3YmuY0vC9auY8IXPEBXBwR4DZ39u4Xi95oP7FGOI2Tjg2vaG-DVctsgGmt5n/s320/2012-02-01%252014.23.58.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglHcq8yJvK3igG1HvcUTRDK28vOVo8HUfW1k_bx97c55H_PKqHhnxBGeDnycU1lljhiB32e4l6-sdQ4XQ9pbfmkzDW24Ty4EoImp4BSLruJvbN3nutOhS0GVRSMD5zbgV8gN948gpTttWH/s320/Capturar2.PNG&quot; width=&quot;224&quot; /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div&gt;
&lt;b&gt;Código para arduino:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
-------------------------------------------------&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void setup() { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; pinMode(13, OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;pinMode(12, OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;pinMode(11, OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;pinMode(10, OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;pinMode(9, OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;pinMode(8, OUTPUT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;void loop() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; //ligar e desligar um led de cada ves&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(13, HIGH); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(13, LOW); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(12, HIGH); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(12, LOW); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(11, HIGH); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(11, LOW); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(10, HIGH); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(10, LOW); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(9, HIGH); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(9, LOW); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(8, HIGH); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(8, LOW); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; //ligar todos os leds em fila e desliga - los &amp;nbsp;todos de uma ves&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(13, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(12, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(11, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(10, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(9, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(8, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(13, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(12, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(11, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(10, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(9, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(8, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(1000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; //liga um pino de cada lado de cada ves&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(13, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(8, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(12, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(9, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(11, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(10, HIGH);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; delay(100);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; digitalWrite(13, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(12, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(11, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(10, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(9, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; digitalWrite(8, LOW);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
-------------------------------------------&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Cumprimentos Rui Marinho!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://electronicpiece.blogspot.com/feeds/7161356493035307472/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/knight-rider-arduino-6leds.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/7161356493035307472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5848748962449588903/posts/default/7161356493035307472'/><link rel='alternate' type='text/html' href='http://electronicpiece.blogspot.com/2012/02/knight-rider-arduino-6leds.html' title='&quot;knight Rider&quot; - Arduino + 6LEDS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYQZDvcNj7vUjiO7ntkoGtJzmn87QmiFEbJpqe66Eu4dj5ynmsVXyJlMGoYlQ4wwhRDgUDaFKcHca-tMDV3YmuY0vC9auY8IXPEBXBwR4DZ39u4Xi95oP7FGOI2Tjg2vaG-DVctsgGmt5n/s72-c/2012-02-01%252014.23.58.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>