tag:blogger.com,1999:blog-52957622827753967982024-03-20T01:29:18.846-07:00Roteiros e trabalhos de Física Experimental 2 PUC SP - 2012-http://www.blogger.com/profile/05571060607904937103noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-5295762282775396798.post-58328758814612213972012-06-11T05:10:00.001-07:002012-06-11T05:10:42.389-07:00"No light Home" - Nona fase - Etapa finalDécima primeira semana(11/06-12/06): P2 - Apresentação FINAL do projeto.<br />
<br />
Apresentação FINAL:<br />
<a href="http://www.4shared.com/file/oriXiw6l/NO_Light_Home_-_Apresentacao_f.html?"><span class="Apple-style-span" style="color: white;">Clique aqui para download</span></a>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-34520262252882414432012-06-07T15:54:00.001-07:002012-06-11T04:59:18.299-07:00"No light Home" - Oitava fase - Etapa final<br />
<div>
Nona semana(28/05-01/06): Aprimoramento final da maquete e do código.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5RhPs4nsI1P3YjVG4Y4GLkZc_T0ZX4tJksqU0iKNylvTu9D-2PKFfh_5xDYzSjcWjxBKDhghxlBz_zmvfDXcqfDlyRLwkQVvM8336ilVy75OLVeAhOjmiPp6_t-oWf0zc5JAEXiBesUk/s1600/foto+1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5RhPs4nsI1P3YjVG4Y4GLkZc_T0ZX4tJksqU0iKNylvTu9D-2PKFfh_5xDYzSjcWjxBKDhghxlBz_zmvfDXcqfDlyRLwkQVvM8336ilVy75OLVeAhOjmiPp6_t-oWf0zc5JAEXiBesUk/s320/foto+1.JPG" style="cursor: move;" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq5NjhgSsp9qrdXkcUszy2fCoJNauih31zglVs5UU8HJbl7r-VGpk_1StMeHXtaUqH6B5AzEIhaTNRKUC-D17COWu2KiPPrSk14OCoZmotOsEUuNMdeG0IzemzS3nWIUzzhks_jJd1WZYU/s1600/foto+3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq5NjhgSsp9qrdXkcUszy2fCoJNauih31zglVs5UU8HJbl7r-VGpk_1StMeHXtaUqH6B5AzEIhaTNRKUC-D17COWu2KiPPrSk14OCoZmotOsEUuNMdeG0IzemzS3nWIUzzhks_jJd1WZYU/s320/foto+3.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR76DULaArPQk3YQrs9-B8FW277pQWCwo5Q13q1oUU3z3CMJ2AR7jr2Vvxpl1HgLw4FClBvdfcu43TC8jBfe9rS1fwMsEDmD4EqEuheXa2QzeLDBjm3Vw2CMfK-IH5_yuw9gBjfgqoNTTx/s1600/foto+2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR76DULaArPQk3YQrs9-B8FW277pQWCwo5Q13q1oUU3z3CMJ2AR7jr2Vvxpl1HgLw4FClBvdfcu43TC8jBfe9rS1fwMsEDmD4EqEuheXa2QzeLDBjm3Vw2CMfK-IH5_yuw9gBjfgqoNTTx/s320/foto+2.JPG" width="320" /></a></div>
<br />
<br />
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
<br />
Código :<br />
<br />
<span class="Apple-style-span" style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;"></span><br />
<div style="line-height: 17px;">
int s0,s1,s2;</div>
<div style="line-height: 17px;">
int L0=0, L1=0,L2=0, L3=0,L4=0,L5 =0,L6 = 0;</div>
<div style="line-height: 17px;">
int ledPin = 1,ledPin1 = 13,ledPin2 = 12;</div>
<div style="line-height: 17px;">
int ctl_1 = 0,ctl_2 = 0;</div>
<div style="line-height: 17px;">
int A=0;</div>
<div style="line-height: 17px;">
int calibL4 = 400, calibL5=200,calibL6=300;//valores de base para sensores da porta</div>
<div style="line-height: 17px;">
int calibD0=1000,calibD1=800, calibD2=800,calibD3=600;//valores de base para disparo de sensores da parede</div>
<div style="line-height: 17px;">
void setup()</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
{</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
//4051 digital control pins</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
pinMode(8, OUTPUT); // s0</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
pinMode(9, OUTPUT); // s1</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
pinMode(10, OUTPUT); // s2</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
Serial.begin(9600);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
int binario(int n, int b){</div>
<div style="line-height: 17px;">
int r[3],a[3];</div>
<div style="line-height: 17px;">
int m10=1;</div>
<div style="line-height: 17px;">
int z=0;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
int q=n,c=2;</div>
<div style="line-height: 17px;">
for(int i=0;i<3;i++) r[i] = 0;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
do{</div>
<div style="line-height: 17px;">
r[c] = q%2;</div>
<div style="line-height: 17px;">
q = q /2;</div>
<div style="line-height: 17px;">
z = (r[c]*m10)+z;</div>
<div style="line-height: 17px;">
m10 = m10 * 10;</div>
<div style="line-height: 17px;">
c = c - 1;</div>
<div style="line-height: 17px;">
}while(q!= 0);</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
return (r[b]); </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
void comodo(float LDR0,float LDR1,float LDR2,float LDR3,float LDR4, float LDR6) { </div>
<div style="line-height: 17px;">
int media, desvio0, desvio1, desvio2, desvio3,desvio4;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
media = (LDR0 + LDR1 + LDR2 + LDR3)/4;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
Serial.print(" "); </div>
<div style="line-height: 17px;">
Serial.print(" media: "); </div>
<div style="line-height: 17px;">
Serial.print(media); </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
desvio0 = (LDR0/media)*1000;</div>
<div style="line-height: 17px;">
desvio1 = (LDR1/media)*1000;</div>
<div style="line-height: 17px;">
desvio2 = (LDR2/media)*1000;</div>
<div style="line-height: 17px;">
desvio3 = (LDR3/media)*1000;</div>
<div style="line-height: 17px;">
desvio4 = (LDR4/media)*1000;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
Serial.print(" "); </div>
<div style="line-height: 17px;">
Serial.print(" D0: "); </div>
<div style="line-height: 17px;">
Serial.print(desvio0); </div>
<div style="line-height: 17px;">
Serial.print(" D1: "); </div>
<div style="line-height: 17px;">
Serial.print(desvio1); </div>
<div style="line-height: 17px;">
Serial.print(" D2: "); </div>
<div style="line-height: 17px;">
Serial.print(desvio2); </div>
<div style="line-height: 17px;">
Serial.print(" D3: "); </div>
<div style="line-height: 17px;">
Serial.print(desvio3); </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
if ((desvio0 < calibD0) ) { </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="line-height: 17px;">
tone(5,261.626);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}else if ((desvio1 < calibD1) ) { </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="line-height: 17px;">
tone(5,329.628);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
else if ((desvio2 < calibD2) ) { </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="line-height: 17px;">
tone(5,391.995);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
else if ((desvio3 < calibD3)) { </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="line-height: 17px;">
tone(5,440);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}else if(LDR6<calibL6){</div>
<div style="line-height: 17px;">
tone(5,220);</div>
<div style="line-height: 17px;">
tone(5,440); </div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
else {</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, LOW);</div>
<div style="line-height: 17px;">
tone(5,LOW);</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
int luz(int a){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
int n1,n2,c1,c2;</div>
<div style="line-height: 17px;">
////////////////////</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
if (a==0){</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> n1 = analogRead(A4); //le L5 </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(n1<calibL5){</div>
<div style="line-height: 17px;">
c1= 1;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
if(c1==1){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> n2 = analogRead(A5);//le L6</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(n2<calibL6){</div>
<div style="line-height: 17px;">
c2 =1;</div>
<div style="line-height: 17px;">
}else c2 = 0;</div>
<div style="line-height: 17px;">
if (c2 == 1){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> digitalWrite(ledPin1, HIGH); //ascende a luz </div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> digitalWrite(ledPin, HIGH); //ascende a luz</div>
<div style="line-height: 17px;">
c2=0;</div>
<div style="line-height: 17px;">
c1 = 0;</div>
<div style="line-height: 17px;">
a=1;</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
/////////////</div>
<div style="line-height: 17px;">
if(a==1){</div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> n2 = analogRead(A5);//le L6</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(n2<calibL6){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
c2= 1; </div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
if(c2==1){</div>
<div style="line-height: 17px;">
//c2=0;</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> n1 = analogRead(A4); //le L5</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(n1<calibL5){</div>
<div style="line-height: 17px;">
c1 =1; </div>
<div style="line-height: 17px;">
}else c1=0;</div>
<div style="line-height: 17px;">
if (c1 == 1){</div>
<div style="line-height: 17px;">
digitalWrite(ledPin1, LOW);//desliga a luz</div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> digitalWrite(ledPin, LOW);//desliga a luz</div>
<div style="line-height: 17px;">
c1=0;</div>
<div style="line-height: 17px;">
c2=0;</div>
<div style="line-height: 17px;">
a=0;</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
/////////</div>
<div style="line-height: 17px;">
return a;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
void loop()</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
{</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(8, LOW);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(9, LOW);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(10, LOW);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
int readInZero = analogRead(0); // read the input pin</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
//Serial.print(readInZero); //use the result</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
for(int j=0; j<=7;j++){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
s0 = binario(j,0);</div>
<div style="line-height: 17px;">
s1 = binario(j,1);</div>
<div style="line-height: 17px;">
s2 = binario(j,2);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(8, s0);//s0</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(9, s1);//s1</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(10, s2);//s2</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
int readInTwo= analogRead(0);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
switch(j){</div>
<div style="line-height: 17px;">
case 0: </div>
<div style="line-height: 17px;">
L0 = readInTwo;</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
case 4: </div>
<div style="line-height: 17px;">
L1 = readInTwo;</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
case 2: </div>
<div style="line-height: 17px;">
L2 = readInTwo;</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
case 6: </div>
<div style="line-height: 17px;">
L3 = readInTwo;</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
default:</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
L4 = analogRead(A3);</div>
<div style="line-height: 17px;">
L5 = analogRead(A4);//n1</div>
<div style="line-height: 17px;">
L6 = analogRead(A5);//n2</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(L4<calibL4){</div>
<div style="line-height: 17px;">
A = luz(A);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
comodo(L0,L1,L2,L3,L4,L6);//controla sinais sonoros no comodo</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
Serial.print("\n L0 ");</div>
<div style="line-height: 17px;">
Serial.print(L0);</div>
<div style="line-height: 17px;">
Serial.print(" L1 ");</div>
<div style="line-height: 17px;">
Serial.print(L1);</div>
<div style="line-height: 17px;">
Serial.print(" L2 ");</div>
<div style="line-height: 17px;">
Serial.print(L2);</div>
<div style="line-height: 17px;">
Serial.print(" L3 ");</div>
<div style="line-height: 17px;">
Serial.print(L3);</div>
<div style="line-height: 17px;">
Serial.print(" L4 ");</div>
<div style="line-height: 17px;">
Serial.print(L4);</div>
<div style="line-height: 17px;">
Serial.print(" L5 ");</div>
<div style="line-height: 17px;">
Serial.print(L5);</div>
<div style="line-height: 17px;">
Serial.print(" L6 ");</div>
<div style="line-height: 17px;">
Serial.print(L6);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
//luz</div>
<div style="line-height: 17px;">
//som</div>
<div>
<br /></div>
</div>
</div>
<br />
<br />
<div>
Décima semana(04/06-08/06): Testes.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiARyeZCof-lFVRNYySN-zmVwxoN1CxVs-txyMAIxgcAQeUHUNn0DTxNBNic8zYyy-DRHIvEpSStaPVj6q5JCrOAlWbRj1uXqKa1gBYyEZrXuTlie0i5rWYMSXC8V1qLcZs8vp65AqXrqHB/s1600/foto+5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiARyeZCof-lFVRNYySN-zmVwxoN1CxVs-txyMAIxgcAQeUHUNn0DTxNBNic8zYyy-DRHIvEpSStaPVj6q5JCrOAlWbRj1uXqKa1gBYyEZrXuTlie0i5rWYMSXC8V1qLcZs8vp65AqXrqHB/s320/foto+5.JPG" width="320" /></a></div>
<br />
<br /></div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-3532460859408818092012-06-04T13:02:00.007-07:002012-06-11T04:52:01.705-07:00"No light Home" - Setima fase - Etapa final<h2>
Etapa final</h2>
<br />
<div>
05/06 - Entrega do pôster e do artigo<br />
<br />
<b>Artigo :</b> <span id="goog_1780991488"></span><span id="goog_1780991489"></span><a href="http://www.4shared.com/office/1AFRA_yG/No_light_home_-_artigo.html?"><span style="color: white;">clique aqui</span></a><span style="color: white;"><a href="http://www.blogger.com/"></a></span><br />
<br />
<b>Pôster : </b><a href="http://www.4shared.com/photo/xvg7Sa-0/poster-nolighthome.html?"><span style="color: white;">clique aqui</span></a><br />
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnk8F9GvqtemHL8aaNLv2KCg-7kGIbpL76RovMKbFEJzXC6nXZHiLrRedDz48yCaCffMUdXMtHcgBQZVwv3kAdmJmnzEsvOUD7jDb7f-FVi6XEDhdrSCMn5GXhlN9-z5binDXe_dSfqFqJ/s1600/poster-nolighthome.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnk8F9GvqtemHL8aaNLv2KCg-7kGIbpL76RovMKbFEJzXC6nXZHiLrRedDz48yCaCffMUdXMtHcgBQZVwv3kAdmJmnzEsvOUD7jDb7f-FVi6XEDhdrSCMn5GXhlN9-z5binDXe_dSfqFqJ/s640/poster-nolighthome.jpg" width="316" /></a></div>
<br /></div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-86309887099972063292012-06-04T13:02:00.006-07:002012-06-11T05:03:09.308-07:00"No light Home" - Sexta fase - Etapa intermediária<br />
<h2>
Etapa intermediária</h2>
<br />
<br />
Oitava semana(21/05-25/05): Etapa INTERMEDIÁRIA do projeto.<br />
<br />
Protótipo<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj014iovkCRletcrlhLLKurCiVwXjiLHrk91roGIdy3u3BCHx787xS_JKbQfAWnTbRNqbDVR8vl3vP9eolFYLwkrfsZK51P3s3YWKgLp93cNTtkrb0rYnIyQfq-7zwOLxxUDfOc-OsCSkv7/s1600/foto+(1).JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" qba="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj014iovkCRletcrlhLLKurCiVwXjiLHrk91roGIdy3u3BCHx787xS_JKbQfAWnTbRNqbDVR8vl3vP9eolFYLwkrfsZK51P3s3YWKgLp93cNTtkrb0rYnIyQfq-7zwOLxxUDfOc-OsCSkv7/s320/foto+(1).JPG" width="320" /></a></div>
<br />
Apresentação do projeto em sala de aula:<br />
<a href="http://www.4shared.com/office/irtNGqLY/No_Light_Home1.html"><span class="Apple-style-span" style="color: white;">Clique aqui para download</span></a>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-26942175945210334602012-06-04T13:02:00.005-07:002012-06-11T05:04:35.006-07:00"No light Home" - Quinta fase - Etapa intermediária<br />
<div>
<h2>
Etapa intermediária</h2>
Terceira semana(16/04-20/04): Pausa para a revisão e a P1 de Física.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7rDhNJD3nRDrHNUBu2060fL5yJwX2bvOvS8FPbtm0hTYKUzwmcN6qkLl1OOaaLCvGmFm5b4HuxaRBp23TzRt_2qd0IHmQb8n7_7VADECEhqZ0NC74Vnky6CxiQOdFCDdq92NIAC-9TsNh/s1600/050405_einstein_tongue_widec.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7rDhNJD3nRDrHNUBu2060fL5yJwX2bvOvS8FPbtm0hTYKUzwmcN6qkLl1OOaaLCvGmFm5b4HuxaRBp23TzRt_2qd0IHmQb8n7_7VADECEhqZ0NC74Vnky6CxiQOdFCDdq92NIAC-9TsNh/s320/050405_einstein_tongue_widec.jpg" width="257" /></a></div>
<br />
<br /></div>
<div>
Quarta semana(24/04-27/04): Etapa final para o desenvolvimento da maquete e do protoboard.<br />
<br /></div>
<div>
Quinta semana(30/04-04/05): Desenvolvimento inicial do código.<br />
<br /></div>
<div>
Sexta semana(07/05-11/05): Desenvolvimento intermediário do código, dúvidas sobre o projeto(em sala) e ajustes.<br />
<br />
<br />
<span class="Apple-style-span" style="background-color: black; color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"></span><br />
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int s0,s1,s2;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int L0=0, L1=0,L2=0, L3=0,L4=0,L5 =0,L6 = 0;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int ledPin = 12,ledPin1 = 13;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int ctl_1 = 0,ctl_2 = 0;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
void setup()</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
{</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
//4051 digital control pins</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
pinMode(8, OUTPUT); // s0</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
pinMode(9, OUTPUT); // s1</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
pinMode(10, OUTPUT); // s2</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.begin(9600);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int binario(int n, int b){</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int r[3],a[3];</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int m10=1;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int z=0;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int q=n,c=2;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
for(int i=0;i<3;i++) r[i] = 0;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
do{</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
r[c] = q%2;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
q = q /2;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
z = (r[c]*m10)+z;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
m10 = m10 * 10;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
c = c - 1;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}while(q!= 0);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
<br /></div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
<br /></div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
return (r[b]); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
void comodo(float LDR0,float LDR1,float LDR2,float LDR3,float LDR4, float LDR5) { </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int media, desvio0, desvio1, desvio2, desvio3,desvio4;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
media = (LDR0 + LDR1 + LDR2 + LDR3)/4;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" "); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" media: "); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(media); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
desvio0 = (LDR0/media)*1000;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
desvio1 = (LDR1/media)*1000;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
desvio2 = (LDR2/media)*1000;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
desvio3 = (LDR3/media)*1000;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
desvio4 = (LDR4/media)*1000;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" "); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" D0: "); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(desvio0); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" D1: "); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(desvio1); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" D2: "); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(desvio2); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" D3: "); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(desvio3); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int luz = 100;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
if(media > luz ) //LUZ</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
{ </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
if ((desvio0 < 900) ) { </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
tone(9,261.626);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}else if ((desvio1 < 700) ) { </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
tone(9,329.628);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
} </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
else if ((desvio2 < 900) ) { </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
tone(9,391.995);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
} </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
else if ((desvio3 < 600)) { </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
tone(9,440);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
} </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
else {</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(ledPin, LOW);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
tone(9,LOW);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
else</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
{</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
if ((desvio0 < 900) ||(desvio2 < 700) ||(desvio1 < 900) ||(desvio3 < 600)) { </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
} </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
else {</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(ledPin, LOW);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
} </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
<br /></div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
void luz(int ldr1,int ldr2){ </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
if(ldr1<200) ctl_1 = (ctl_1+1)%2;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
if(ctl_1==0) ctl_2=0;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
if(ctl_1==1 &&ldr2<200){</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
ctl_2 = 1;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
if( ctl_2 ==1) {</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(ledPin1, HIGH);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
delay(100);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
else digitalWrite(ledPin1, LOW);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
void loop()</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
{</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
//Read Value of 4051 analog-in 0 by setting the values of s0,s1 and s2</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(8, LOW);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(9, LOW);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(10, LOW);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
delay(10); //not sure if this delay is strictly necessary</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int readInZero = analogRead(0); // read the input pin</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
//Serial.print(readInZero); //use the result</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
for(int j=0; j<=7;j++){</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
s0 = binario(j,0);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
s1 = binario(j,1);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
s2 = binario(j,2);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(8, s0);//s0</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(9, s1);//s1</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
digitalWrite(10, s2);//s2</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
int readInTwo= analogRead(0);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
switch(j){</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
case 0: </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
L0 = readInTwo;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
break;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
case 4: </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
L1 = readInTwo;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
break;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
case 2: </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
L2 = readInTwo;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
break;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
case 6: </div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
L3 = readInTwo;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
break;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
default:</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
break;</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
L4 = analogRead(A3);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
L5 = analogRead(A5);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
L6 = analogRead(A4);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
luz(L5,L6);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
comodo(L0,L1,L2,L3,L4,L5);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print("\n L0 ");</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(L0);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" L1 ");</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(L1);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" L2 ");</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(L2);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" L3 ");</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(L3);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" L4 ");</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(L4);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" L5 ");</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(L5);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(" L6 ");</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
Serial.print(L6);</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
<br /></div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
</div>
<div style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;">
}</div>
<br />
<br />
<br /></div>
<div>
Sétima semana(14/05-18/05): Desenvolvimento final do código.</div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-44458526485326818472012-06-04T13:02:00.004-07:002012-06-11T04:52:40.261-07:00"No light Home" - Quarta fase - Etapa inicial<h3>
ETAPA INICIAL</h3>
Segunda semana(09/04-13/04): Preparação inicial do desenvolvimento da maquete e do protoboard.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT3rMK0scZ1dJJB4deQ5ZOwKY0U2QnUcCH4PtE4huJo7dELOBPtgOQd0CAyy-Ylaa7IF4sTHsPY8tb5U890hpISaByeTGpXkPbpyTdfBecfkTTUdv5Ny2GjivTorzilQvGghq4iSzgIv6P/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT3rMK0scZ1dJJB4deQ5ZOwKY0U2QnUcCH4PtE4huJo7dELOBPtgOQd0CAyy-Ylaa7IF4sTHsPY8tb5U890hpISaByeTGpXkPbpyTdfBecfkTTUdv5Ny2GjivTorzilQvGghq4iSzgIv6P/s320/foto.JPG" width="320" /></a></div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-16383251018407290292012-06-04T13:02:00.003-07:002012-06-11T04:52:53.196-07:00"No light Home" - Terceira fase - Etapa inicial<h2>
Etapa inicial</h2>
Primeira semana(02/04-06/04): Análise para a compra dos materiais necessários para o desenvolvimento do projeto e da maquete.
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0DhJb70ElefnCIQ0V62R-M-MEKcoxIPMm9guR9WciLtrnlJbI0_pZA8jDRYx-dmeS7asslzDGnAXNZQltUfiMO-FuRQkju5-lQK6K_vmNMQ8i25og6McfRH-Fh7rExMGK28LbCaxACHyZ/s1600/foto.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0DhJb70ElefnCIQ0V62R-M-MEKcoxIPMm9guR9WciLtrnlJbI0_pZA8jDRYx-dmeS7asslzDGnAXNZQltUfiMO-FuRQkju5-lQK6K_vmNMQ8i25og6McfRH-Fh7rExMGK28LbCaxACHyZ/s200/foto.JPG" width="149" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZzcGu-Mi5fMDdtSajVqSGJmlCUsp5MQRgKnRLMxuJZ5211zRHpYvkyGcXquAusr9h5-3gbhdfDfzXLM4Ev0olmVDLQxny7XnF09OXU6zaLAzTbPmi6nT0SbyBovPbbdLohwdPb2d57PFa/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZzcGu-Mi5fMDdtSajVqSGJmlCUsp5MQRgKnRLMxuJZ5211zRHpYvkyGcXquAusr9h5-3gbhdfDfzXLM4Ev0olmVDLQxny7XnF09OXU6zaLAzTbPmi6nT0SbyBovPbbdLohwdPb2d57PFa/s200/foto.JPG" width="149" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5DG9J_cQeO95ZnDs-k8_JycCPGooOYsc6W8J82FpicKoQmECtWSrV54JvtIfybuFstLrKULrh3gIL0OVXfMf5FhRUsf0oWUcpilawJ63LJcdjIy9yQjLcUzV8QQvJBoAjrVF3TpVIyWa/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5DG9J_cQeO95ZnDs-k8_JycCPGooOYsc6W8J82FpicKoQmECtWSrV54JvtIfybuFstLrKULrh3gIL0OVXfMf5FhRUsf0oWUcpilawJ63LJcdjIy9yQjLcUzV8QQvJBoAjrVF3TpVIyWa/s200/foto.JPG" width="149" /></a><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJK0qJymDCpescsEwhTb-oXG9Oc-YQ9mXopNYAoRMcMy32zkSVzQ1yxnDoL5An0Bep8EeBS2HQktlbncgVE-3yp08OicCjSbGY_9OGEaA_Y3sJ7YhGV006xO5zeQqT7DM0B-szWyrUxKp8/s1600/foto.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJK0qJymDCpescsEwhTb-oXG9Oc-YQ9mXopNYAoRMcMy32zkSVzQ1yxnDoL5An0Bep8EeBS2HQktlbncgVE-3yp08OicCjSbGY_9OGEaA_Y3sJ7YhGV006xO5zeQqT7DM0B-szWyrUxKp8/s200/foto.JPG" width="148" /></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL8i7prt6PqdwL7JYoov5IKcjt-AFUhVnF7vXIKCroKN43Pa7VEzG3ILAnqNG9LFlAdXKHxRlr322Tsuzsf5I9JgWSrxVSYLh2-ddrlKTdUvO9McX5ObirrGbS8QDui3fs07Qn2UxuilON/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL8i7prt6PqdwL7JYoov5IKcjt-AFUhVnF7vXIKCroKN43Pa7VEzG3ILAnqNG9LFlAdXKHxRlr322Tsuzsf5I9JgWSrxVSYLh2-ddrlKTdUvO9McX5ObirrGbS8QDui3fs07Qn2UxuilON/s200/foto.JPG" width="149" /></a><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd6EZ9DND6lSFI6U0D35hmgvEM58fpiNf25N9Y1sOs9RjHjMQXGNN3gU75VjQiqos4wshEJMftJDCW_NHFhoK16UrSC9ramNUhIEN8B5ccaR5sAOjdcQfp8mKOzwMrbnIfccaHl3ZCAJ8R/s1600/foto.JPG" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd6EZ9DND6lSFI6U0D35hmgvEM58fpiNf25N9Y1sOs9RjHjMQXGNN3gU75VjQiqos4wshEJMftJDCW_NHFhoK16UrSC9ramNUhIEN8B5ccaR5sAOjdcQfp8mKOzwMrbnIfccaHl3ZCAJ8R/s200/foto.JPG" width="200" /></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPPp7T7_bQ1WB3h8VkXVEwbBh-Sx8bjnqUmvPdHFCRRWnlJKWCfzj7LxjxBVLvKKmbozZqJiy3f5WxsdMUiYe30QkIzUzVBwOr3lSq5vnhHa8I6O8XW7lUUUeJPE3eYfKd2qME238jO-dT/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPPp7T7_bQ1WB3h8VkXVEwbBh-Sx8bjnqUmvPdHFCRRWnlJKWCfzj7LxjxBVLvKKmbozZqJiy3f5WxsdMUiYe30QkIzUzVBwOr3lSq5vnhHa8I6O8XW7lUUUeJPE3eYfKd2qME238jO-dT/s200/foto.JPG" width="200" /></a><br />
<br />
<br />
<br />-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-31109253349517719552012-06-04T13:02:00.002-07:002012-06-11T04:53:28.070-07:00"No light Home" - Segunda fase - Cronograma<br />
<h3>
<span style="font-size: large;">Etapas do projeto:</span></h3>
<br />
<br />
Primeira semana(02/04-06/04): Análise para a compra dos materiais necessários para o desenvolvimento do projeto e da maquete.
<br />
Segunda semana(09/04-13/04): Preparação inicial do desenvolvimento da maquete e do protoboard.
<br />
Terceira semana(16/04-20/04): Pausa para a revisão e a P1 de Física.
<br />
<br />
<div>
Quarta semana(24/04-27/04): Etapa final para o desenvolvimento da maquete e do protoboard.</div>
<div>
Quinta semana(30/04-04/05): Desenvolvimento inicial do código.</div>
<div>
Sexta semana(07/05-11/05): Desenvolvimento intermediário do código, dúvidas sobre o projeto(em sala) e ajustes.</div>
<div>
Sétima semana(14/05-18/05): Desenvolvimento final do código.</div>
<div>
Oitava semana(21/05-25/05): Etapa INTERMEDIÁRIA do projeto.<br />
<br />
<div>
Nona semana(28/05-01/06): Aprimoramento final da maquete e do código.</div>
<div>
Décima semana(04/06-08/06): Testes.</div>
<div>
Décima primeira semana(11/06-12/06): P2 - Apresentação FINAL do projeto.</div>
</div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-59589035662175323042012-06-04T13:02:00.001-07:002012-06-11T04:53:38.664-07:00"No light Home" - Primeira fase - Proposta<br />
<h3>
<span style="font-size: large;">Descrição:</span></h3>
Nosso projeto consiste no desenvolvimento de uma casa de repouso para deficientes.<br />
A casa permite que deficientes visuais possam andar sem a utilização de 'bengalas', pois a casa possui sensores que informam o deficiente sua localização e o alerta sobre possíveis objetos em seu caminho. Como dito anteriormente, a casa tem um sistemas de sensores que ajudarão a economizar energia, ou seja, ao passar ou ao permanecer em um cômodo, a luz se acenderá e ao sair, ela se apagará. Como a movimentação é grande, devido aos deficientes, não só visuais, como mudo e surdo e até mesmo os familiares e auxiliares que andam pela casa.<br />
<br />
<br />
<h3>
<span style="font-size: large;">Materiais necessários para a realização do projeto:</span></h3>
- Arduino<br />
- Protoboard<br />
- LEDs<br />
- LDRs<br />
- Resistência de 10k<br />
- Maquete<br />
<br />
<br />
<div>
<h2>
Apresentação do projeto em sala de aula:</h2>
</div>
<div>
<a href="http://www.4shared.com/file/dKF1J64t/Projeto.html?">http://www.4shared.com/file/dKF1J64t/Projeto.html?</a></div>
<br />
<br />-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-90580695672000317152012-04-02T13:45:00.001-07:002012-06-11T05:09:59.139-07:00Projeto Arduíno : "No Light Home"<h3>
<span style="font-size: large;">Descrição:</span></h3>
Nosso projeto consiste no desenvolvimento de uma casa de repouso para deficientes.<br />
A casa permite que deficientes visuais possam andar sem a utilização de 'bengalas', pois a casa possui sensores que informam o deficiente sua localização e o alerta sobre possíveis objetos em seu caminho. Como dito anteriormente, a casa tem um sistemas de sensores que ajudarão a economizar energia, ou seja, ao passar ou ao permanecer em um cômodo, a luz se acenderá e ao sair, ela se apagará. Como a movimentação é grande, devido aos deficientes, não só visuais, como mudo e surdo e até mesmo os familiares e auxiliares que andam pela casa.<br />
<br />
<h3>
<span style="font-size: large;">Materiais necessários para a realização do projeto:</span></h3>
- Arduino<br />
- Protoboard<br />
- LEDs<br />
- LDRs<br />
- Resistência de 10k<br />
- Maquete<br />
<br />
<h3>
<span style="font-size: large;">Etapas do projeto:</span></h3>
<div>
Apresentação do projeto em sala de aula:</div>
<div>
<br /></div>
<div>
<a href="http://www.4shared.com/file/dKF1J64t/Projeto.html?">http://www.4shared.com/file/dKF1J64t/Projeto.html?</a> </div>
<div>
<br /></div>
<div>
Primeira semana(02/04-06/04): Análise para a compra dos materiais necessários para o desenvolvimento do projeto e da maquete.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0DhJb70ElefnCIQ0V62R-M-MEKcoxIPMm9guR9WciLtrnlJbI0_pZA8jDRYx-dmeS7asslzDGnAXNZQltUfiMO-FuRQkju5-lQK6K_vmNMQ8i25og6McfRH-Fh7rExMGK28LbCaxACHyZ/s1600/foto.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0DhJb70ElefnCIQ0V62R-M-MEKcoxIPMm9guR9WciLtrnlJbI0_pZA8jDRYx-dmeS7asslzDGnAXNZQltUfiMO-FuRQkju5-lQK6K_vmNMQ8i25og6McfRH-Fh7rExMGK28LbCaxACHyZ/s200/foto.JPG" width="149" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJK0qJymDCpescsEwhTb-oXG9Oc-YQ9mXopNYAoRMcMy32zkSVzQ1yxnDoL5An0Bep8EeBS2HQktlbncgVE-3yp08OicCjSbGY_9OGEaA_Y3sJ7YhGV006xO5zeQqT7DM0B-szWyrUxKp8/s1600/foto.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJK0qJymDCpescsEwhTb-oXG9Oc-YQ9mXopNYAoRMcMy32zkSVzQ1yxnDoL5An0Bep8EeBS2HQktlbncgVE-3yp08OicCjSbGY_9OGEaA_Y3sJ7YhGV006xO5zeQqT7DM0B-szWyrUxKp8/s200/foto.JPG" width="148" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZzcGu-Mi5fMDdtSajVqSGJmlCUsp5MQRgKnRLMxuJZ5211zRHpYvkyGcXquAusr9h5-3gbhdfDfzXLM4Ev0olmVDLQxny7XnF09OXU6zaLAzTbPmi6nT0SbyBovPbbdLohwdPb2d57PFa/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZzcGu-Mi5fMDdtSajVqSGJmlCUsp5MQRgKnRLMxuJZ5211zRHpYvkyGcXquAusr9h5-3gbhdfDfzXLM4Ev0olmVDLQxny7XnF09OXU6zaLAzTbPmi6nT0SbyBovPbbdLohwdPb2d57PFa/s200/foto.JPG" width="149" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5DG9J_cQeO95ZnDs-k8_JycCPGooOYsc6W8J82FpicKoQmECtWSrV54JvtIfybuFstLrKULrh3gIL0OVXfMf5FhRUsf0oWUcpilawJ63LJcdjIy9yQjLcUzV8QQvJBoAjrVF3TpVIyWa/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5DG9J_cQeO95ZnDs-k8_JycCPGooOYsc6W8J82FpicKoQmECtWSrV54JvtIfybuFstLrKULrh3gIL0OVXfMf5FhRUsf0oWUcpilawJ63LJcdjIy9yQjLcUzV8QQvJBoAjrVF3TpVIyWa/s200/foto.JPG" width="149" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd6EZ9DND6lSFI6U0D35hmgvEM58fpiNf25N9Y1sOs9RjHjMQXGNN3gU75VjQiqos4wshEJMftJDCW_NHFhoK16UrSC9ramNUhIEN8B5ccaR5sAOjdcQfp8mKOzwMrbnIfccaHl3ZCAJ8R/s1600/foto.JPG" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd6EZ9DND6lSFI6U0D35hmgvEM58fpiNf25N9Y1sOs9RjHjMQXGNN3gU75VjQiqos4wshEJMftJDCW_NHFhoK16UrSC9ramNUhIEN8B5ccaR5sAOjdcQfp8mKOzwMrbnIfccaHl3ZCAJ8R/s200/foto.JPG" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPPp7T7_bQ1WB3h8VkXVEwbBh-Sx8bjnqUmvPdHFCRRWnlJKWCfzj7LxjxBVLvKKmbozZqJiy3f5WxsdMUiYe30QkIzUzVBwOr3lSq5vnhHa8I6O8XW7lUUUeJPE3eYfKd2qME238jO-dT/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPPp7T7_bQ1WB3h8VkXVEwbBh-Sx8bjnqUmvPdHFCRRWnlJKWCfzj7LxjxBVLvKKmbozZqJiy3f5WxsdMUiYe30QkIzUzVBwOr3lSq5vnhHa8I6O8XW7lUUUeJPE3eYfKd2qME238jO-dT/s200/foto.JPG" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL8i7prt6PqdwL7JYoov5IKcjt-AFUhVnF7vXIKCroKN43Pa7VEzG3ILAnqNG9LFlAdXKHxRlr322Tsuzsf5I9JgWSrxVSYLh2-ddrlKTdUvO9McX5ObirrGbS8QDui3fs07Qn2UxuilON/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL8i7prt6PqdwL7JYoov5IKcjt-AFUhVnF7vXIKCroKN43Pa7VEzG3ILAnqNG9LFlAdXKHxRlr322Tsuzsf5I9JgWSrxVSYLh2-ddrlKTdUvO9McX5ObirrGbS8QDui3fs07Qn2UxuilON/s200/foto.JPG" width="149" /></a></div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br /></div>
<div>
Segunda semana(09/04-13/04): Preparação inicial do desenvolvimento da maquete e do protoboard.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT3rMK0scZ1dJJB4deQ5ZOwKY0U2QnUcCH4PtE4huJo7dELOBPtgOQd0CAyy-Ylaa7IF4sTHsPY8tb5U890hpISaByeTGpXkPbpyTdfBecfkTTUdv5Ny2GjivTorzilQvGghq4iSzgIv6P/s1600/foto.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT3rMK0scZ1dJJB4deQ5ZOwKY0U2QnUcCH4PtE4huJo7dELOBPtgOQd0CAyy-Ylaa7IF4sTHsPY8tb5U890hpISaByeTGpXkPbpyTdfBecfkTTUdv5Ny2GjivTorzilQvGghq4iSzgIv6P/s320/foto.JPG" width="320" /></a></div>
<br /></div>
<div>
Terceira semana(16/04-20/04): Pausa para a revisão e a P1 de Física.<br />
<br /></div>
<div>
Quarta semana(24/04-27/04): Etapa final para o desenvolvimento da maquete e do protoboard.<br />
<br /></div>
<div>
Quinta semana(30/04-04/05): Desenvolvimento inicial do código.<br />
<br /></div>
<div>
Sexta semana(07/05-11/05): Desenvolvimento intermediário do código, dúvidas sobre o projeto(em sala) e ajustes.<br />
<br /></div>
<div>
Sétima semana(14/05-18/05): Desenvolvimento final do código.<br />
<br /></div>
<div>
Oitava semana(21/05-25/05): Etapa INTERMEDIÁRIA do projeto.<br />
<br />
Protótipo<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj014iovkCRletcrlhLLKurCiVwXjiLHrk91roGIdy3u3BCHx787xS_JKbQfAWnTbRNqbDVR8vl3vP9eolFYLwkrfsZK51P3s3YWKgLp93cNTtkrb0rYnIyQfq-7zwOLxxUDfOc-OsCSkv7/s1600/foto+(1).JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" qba="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj014iovkCRletcrlhLLKurCiVwXjiLHrk91roGIdy3u3BCHx787xS_JKbQfAWnTbRNqbDVR8vl3vP9eolFYLwkrfsZK51P3s3YWKgLp93cNTtkrb0rYnIyQfq-7zwOLxxUDfOc-OsCSkv7/s320/foto+(1).JPG" width="320" /></a></div>
<br />
Apresentação do projeto em sala de aula:<br />
<a href="http://www.4shared.com/office/irtNGqLY/No_Light_Home1.html">http://www.4shared.com/office/irtNGqLY/No_Light_Home1.html</a><br />
<br />
<br />
<b>- Entrega do pôster e do artigo</b><br />
<br />
<b>Artigo :</b> <span id="goog_1780991488"></span><span id="goog_1780991489"></span><a href="http://www.4shared.com/office/1AFRA_yG/No_light_home_-_artigo.html?"><span style="color: white;">clique aqui</span></a><span style="color: white;"><a href="http://www.blogger.com/"></a></span><br />
<br />
<b>Pôster : </b><a href="http://www.4shared.com/photo/xvg7Sa-0/poster-nolighthome.html?"><span style="color: white;">clique aqui</span></a><br />
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnk8F9GvqtemHL8aaNLv2KCg-7kGIbpL76RovMKbFEJzXC6nXZHiLrRedDz48yCaCffMUdXMtHcgBQZVwv3kAdmJmnzEsvOUD7jDb7f-FVi6XEDhdrSCMn5GXhlN9-z5binDXe_dSfqFqJ/s1600/poster-nolighthome.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnk8F9GvqtemHL8aaNLv2KCg-7kGIbpL76RovMKbFEJzXC6nXZHiLrRedDz48yCaCffMUdXMtHcgBQZVwv3kAdmJmnzEsvOUD7jDb7f-FVi6XEDhdrSCMn5GXhlN9-z5binDXe_dSfqFqJ/s640/poster-nolighthome.jpg" width="316" /></a></div>
<br />
<br />
<br />
Nona semana(28/05-01/06): Aprimoramento final da maquete e do código.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5RhPs4nsI1P3YjVG4Y4GLkZc_T0ZX4tJksqU0iKNylvTu9D-2PKFfh_5xDYzSjcWjxBKDhghxlBz_zmvfDXcqfDlyRLwkQVvM8336ilVy75OLVeAhOjmiPp6_t-oWf0zc5JAEXiBesUk/s1600/foto+1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK5RhPs4nsI1P3YjVG4Y4GLkZc_T0ZX4tJksqU0iKNylvTu9D-2PKFfh_5xDYzSjcWjxBKDhghxlBz_zmvfDXcqfDlyRLwkQVvM8336ilVy75OLVeAhOjmiPp6_t-oWf0zc5JAEXiBesUk/s320/foto+1.JPG" width="320" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq5NjhgSsp9qrdXkcUszy2fCoJNauih31zglVs5UU8HJbl7r-VGpk_1StMeHXtaUqH6B5AzEIhaTNRKUC-D17COWu2KiPPrSk14OCoZmotOsEUuNMdeG0IzemzS3nWIUzzhks_jJd1WZYU/s1600/foto+3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq5NjhgSsp9qrdXkcUszy2fCoJNauih31zglVs5UU8HJbl7r-VGpk_1StMeHXtaUqH6B5AzEIhaTNRKUC-D17COWu2KiPPrSk14OCoZmotOsEUuNMdeG0IzemzS3nWIUzzhks_jJd1WZYU/s320/foto+3.JPG" width="320" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR76DULaArPQk3YQrs9-B8FW277pQWCwo5Q13q1oUU3z3CMJ2AR7jr2Vvxpl1HgLw4FClBvdfcu43TC8jBfe9rS1fwMsEDmD4EqEuheXa2QzeLDBjm3Vw2CMfK-IH5_yuw9gBjfgqoNTTx/s1600/foto+2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR76DULaArPQk3YQrs9-B8FW277pQWCwo5Q13q1oUU3z3CMJ2AR7jr2Vvxpl1HgLw4FClBvdfcu43TC8jBfe9rS1fwMsEDmD4EqEuheXa2QzeLDBjm3Vw2CMfK-IH5_yuw9gBjfgqoNTTx/s320/foto+2.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<br />
<div>
Código :<br />
<br />
<span class="Apple-style-span" style="background-color: white; color: #2a2a2a; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px;"></span><br />
<div style="line-height: 17px;">
int s0,s1,s2;</div>
<div style="line-height: 17px;">
int L0=0, L1=0,L2=0, L3=0,L4=0,L5 =0,L6 = 0;</div>
<div style="line-height: 17px;">
int ledPin = 1,ledPin1 = 13,ledPin2 = 12;</div>
<div style="line-height: 17px;">
int ctl_1 = 0,ctl_2 = 0;</div>
<div style="line-height: 17px;">
int A=0;</div>
<div style="line-height: 17px;">
int calibL4 = 400, calibL5=200,calibL6=300;//valores de base para sensores da porta</div>
<div style="line-height: 17px;">
int calibD0=1000,calibD1=800, calibD2=800,calibD3=600;//valores de base para disparo de sensores da parede</div>
<div style="line-height: 17px;">
void setup()</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
{</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
//4051 digital control pins</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
pinMode(8, OUTPUT); // s0</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
pinMode(9, OUTPUT); // s1</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
pinMode(10, OUTPUT); // s2</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
Serial.begin(9600);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
int binario(int n, int b){</div>
<div style="line-height: 17px;">
int r[3],a[3];</div>
<div style="line-height: 17px;">
int m10=1;</div>
<div style="line-height: 17px;">
int z=0;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
int q=n,c=2;</div>
<div style="line-height: 17px;">
for(int i=0;i<3;i++) r[i] = 0;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
do{</div>
<div style="line-height: 17px;">
r[c] = q%2;</div>
<div style="line-height: 17px;">
q = q /2;</div>
<div style="line-height: 17px;">
z = (r[c]*m10)+z;</div>
<div style="line-height: 17px;">
m10 = m10 * 10;</div>
<div style="line-height: 17px;">
c = c - 1;</div>
<div style="line-height: 17px;">
}while(q!= 0);</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
return (r[b]); </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
void comodo(float LDR0,float LDR1,float LDR2,float LDR3,float LDR4, float LDR6) { </div>
<div style="line-height: 17px;">
int media, desvio0, desvio1, desvio2, desvio3,desvio4;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
media = (LDR0 + LDR1 + LDR2 + LDR3)/4;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
Serial.print(" "); </div>
<div style="line-height: 17px;">
Serial.print(" media: "); </div>
<div style="line-height: 17px;">
Serial.print(media); </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
desvio0 = (LDR0/media)*1000;</div>
<div style="line-height: 17px;">
desvio1 = (LDR1/media)*1000;</div>
<div style="line-height: 17px;">
desvio2 = (LDR2/media)*1000;</div>
<div style="line-height: 17px;">
desvio3 = (LDR3/media)*1000;</div>
<div style="line-height: 17px;">
desvio4 = (LDR4/media)*1000;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
Serial.print(" "); </div>
<div style="line-height: 17px;">
Serial.print(" D0: "); </div>
<div style="line-height: 17px;">
Serial.print(desvio0); </div>
<div style="line-height: 17px;">
Serial.print(" D1: "); </div>
<div style="line-height: 17px;">
Serial.print(desvio1); </div>
<div style="line-height: 17px;">
Serial.print(" D2: "); </div>
<div style="line-height: 17px;">
Serial.print(desvio2); </div>
<div style="line-height: 17px;">
Serial.print(" D3: "); </div>
<div style="line-height: 17px;">
Serial.print(desvio3); </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
if ((desvio0 < calibD0) ) { </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="line-height: 17px;">
tone(5,261.626);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}else if ((desvio1 < calibD1) ) { </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="line-height: 17px;">
tone(5,329.628);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
else if ((desvio2 < calibD2) ) { </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="line-height: 17px;">
tone(5,391.995);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
else if ((desvio3 < calibD3)) { </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, HIGH); </div>
<div style="line-height: 17px;">
tone(5,440);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}else if(LDR6<calibL6){</div>
<div style="line-height: 17px;">
tone(5,220);</div>
<div style="line-height: 17px;">
tone(5,440); </div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
else {</div>
<div style="line-height: 17px;">
digitalWrite(ledPin, LOW);</div>
<div style="line-height: 17px;">
tone(5,LOW);</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
int luz(int a){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
int n1,n2,c1,c2;</div>
<div style="line-height: 17px;">
////////////////////</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
if (a==0){</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> n1 = analogRead(A4); //le L5 </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(n1<calibL5){</div>
<div style="line-height: 17px;">
c1= 1;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
if(c1==1){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> n2 = analogRead(A5);//le L6</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(n2<calibL6){</div>
<div style="line-height: 17px;">
c2 =1;</div>
<div style="line-height: 17px;">
}else c2 = 0;</div>
<div style="line-height: 17px;">
if (c2 == 1){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> digitalWrite(ledPin1, HIGH); //ascende a luz </div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> digitalWrite(ledPin, HIGH); //ascende a luz</div>
<div style="line-height: 17px;">
c2=0;</div>
<div style="line-height: 17px;">
c1 = 0;</div>
<div style="line-height: 17px;">
a=1;</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
/////////////</div>
<div style="line-height: 17px;">
if(a==1){</div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> n2 = analogRead(A5);//le L6</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(n2<calibL6){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
c2= 1; </div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
if(c2==1){</div>
<div style="line-height: 17px;">
//c2=0;</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> n1 = analogRead(A4); //le L5</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(n1<calibL5){</div>
<div style="line-height: 17px;">
c1 =1; </div>
<div style="line-height: 17px;">
}else c1=0;</div>
<div style="line-height: 17px;">
if (c1 == 1){</div>
<div style="line-height: 17px;">
digitalWrite(ledPin1, LOW);//desliga a luz</div>
<div style="line-height: 17px;">
<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre;"> </span> digitalWrite(ledPin, LOW);//desliga a luz</div>
<div style="line-height: 17px;">
c1=0;</div>
<div style="line-height: 17px;">
c2=0;</div>
<div style="line-height: 17px;">
a=0;</div>
<div style="line-height: 17px;">
} </div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
/////////</div>
<div style="line-height: 17px;">
return a;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
void loop()</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
{</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(8, LOW);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(9, LOW);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(10, LOW);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
int readInZero = analogRead(0); // read the input pin</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
//Serial.print(readInZero); //use the result</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
for(int j=0; j<=7;j++){</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
s0 = binario(j,0);</div>
<div style="line-height: 17px;">
s1 = binario(j,1);</div>
<div style="line-height: 17px;">
s2 = binario(j,2);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(8, s0);//s0</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(9, s1);//s1</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
digitalWrite(10, s2);//s2</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
int readInTwo= analogRead(0);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
switch(j){</div>
<div style="line-height: 17px;">
case 0: </div>
<div style="line-height: 17px;">
L0 = readInTwo;</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
case 4: </div>
<div style="line-height: 17px;">
L1 = readInTwo;</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
case 2: </div>
<div style="line-height: 17px;">
L2 = readInTwo;</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
case 6: </div>
<div style="line-height: 17px;">
L3 = readInTwo;</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
default:</div>
<div style="line-height: 17px;">
break;</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
L4 = analogRead(A3);</div>
<div style="line-height: 17px;">
L5 = analogRead(A4);//n1</div>
<div style="line-height: 17px;">
L6 = analogRead(A5);//n2</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
if(L4<calibL4){</div>
<div style="line-height: 17px;">
A = luz(A);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
comodo(L0,L1,L2,L3,L4,L6);//controla sinais sonoros no comodo</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
Serial.print("\n L0 ");</div>
<div style="line-height: 17px;">
Serial.print(L0);</div>
<div style="line-height: 17px;">
Serial.print(" L1 ");</div>
<div style="line-height: 17px;">
Serial.print(L1);</div>
<div style="line-height: 17px;">
Serial.print(" L2 ");</div>
<div style="line-height: 17px;">
Serial.print(L2);</div>
<div style="line-height: 17px;">
Serial.print(" L3 ");</div>
<div style="line-height: 17px;">
Serial.print(L3);</div>
<div style="line-height: 17px;">
Serial.print(" L4 ");</div>
<div style="line-height: 17px;">
Serial.print(L4);</div>
<div style="line-height: 17px;">
Serial.print(" L5 ");</div>
<div style="line-height: 17px;">
Serial.print(L5);</div>
<div style="line-height: 17px;">
Serial.print(" L6 ");</div>
<div style="line-height: 17px;">
Serial.print(L6);</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
<br style="line-height: 17px;" /></div>
<div style="line-height: 17px;">
</div>
<div style="line-height: 17px;">
}</div>
<div style="line-height: 17px;">
//luz</div>
<div style="line-height: 17px;">
//som</div>
<div style="line-height: 17px;">
<br /></div>
<div style="line-height: 17px;">
<br /></div>
<br />
<br />
Décima semana(04/06-08/06): Testes.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiARyeZCof-lFVRNYySN-zmVwxoN1CxVs-txyMAIxgcAQeUHUNn0DTxNBNic8zYyy-DRHIvEpSStaPVj6q5JCrOAlWbRj1uXqKa1gBYyEZrXuTlie0i5rWYMSXC8V1qLcZs8vp65AqXrqHB/s1600/foto+5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiARyeZCof-lFVRNYySN-zmVwxoN1CxVs-txyMAIxgcAQeUHUNn0DTxNBNic8zYyy-DRHIvEpSStaPVj6q5JCrOAlWbRj1uXqKa1gBYyEZrXuTlie0i5rWYMSXC8V1qLcZs8vp65AqXrqHB/s320/foto+5.JPG" width="320" /></a></div>
<br />
<br /></div>
<div>
<br />
Décima primeira semana(11/06-12/06): P2 - Apresentação FINAL do projeto.<br />
<br />
Apresentação FINAL:<br />
<a href="http://www.4shared.com/file/oriXiw6l/NO_Light_Home_-_Apresentacao_f.html?"><span class="Apple-style-span" style="color: white;">Clique aqui para download</span></a><br />
</div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com1tag:blogger.com,1999:blog-5295762282775396798.post-87644329048137489512012-03-27T06:44:00.000-07:002012-03-27T06:44:44.000-07:00R5 - Exercício extra - a,b e c <br />
<br />
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/DzcjbKX5yHg?feature=player_embedded' frameborder='0'></iframe><br />
R5 - Extra - Iten (a) :<br />
<div id="watch-description-text"><div id="eow-description">Demonstração da direção e sentido de uma carga positiva em um campo elétrico pré-definido.</div></div><br />
_<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/-0hc4uE8oHA?feature=player_embedded' frameborder='0'></iframe></div>R5 - Extra - Iten (b) :<br />
<div id="watch-description-text"><div id="eow-description">Demonstra o comportamento de uma carga negativa lançada perpendicularmente em um campo. Seu movimento é circular em direção oposta ao campo.</div></div>_<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/7pB-JFItjKE?feature=player_embedded' frameborder='0'></iframe></div>R5 - Extra - Iten (c) :<br />
<div id="watch-description-text"><div id="eow-description">Demonstra o comportamento de uma carga negativa lançada perpendicularmente em um campo. Seu movimento é circular em direção oposta ao campo.</div></div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-74889720875511381412012-03-06T05:35:00.006-08:002012-05-14T14:27:00.731-07:00R5 - Campo elétrico<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/FOCKhkkj2sg?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<div style="text-align: left;">
<span style="background-color: white;"><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 18px;">"Continue segurando com o mouse a carga positiva de maior massa e superponha as duas cargas. Tente arrastando com o mouse a carga positiva (com movimentos sutis) até que a carga negativa comece a girar ao redor da carga positiva."</span><br style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;" /><br style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;" /><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 18px;">Observações:</span><br style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;" /><br style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;" /><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 18px;">- Programa usado : Campo elétrico dos sonhos(1.04)</span><br style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;" /><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 18px;">- A carga que está no centro, é positiva +1, com massa 1.000. A carga que está em volta, no caso, girando sobre a carga positiva, é uma carga negativa -1, com massa 1.</span></span> </div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0tag:blogger.com,1999:blog-5295762282775396798.post-87412643186322888842012-02-28T08:31:00.009-08:002012-05-14T14:27:28.455-07:00Roteiro 4<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/vlowy97XYrc?feature=player_embedded' frameborder='0'></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b>-Programa usado: Arduino.</b></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b>- Código fonte:</b></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">int LDR; //declara variável</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">float VLDR;</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">int ledPin=13;</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">int ledPin1=12;</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">int ledPin2=3;</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">int ledPin3=2;</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">void setup(){</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">Serial.begin(9600);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">pinMode(A0, INPUT);// entrada A0</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">pinMode(13,OUTPUT); // define o pino 13 como saida</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">pinMode(12,OUTPUT);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">pinMode(3,OUTPUT);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">pinMode(2,OUTPUT);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">pinMode(9,OUTPUT); }</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">void loop(){</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">LDR = analogRead(A0);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">VLDR=LDR*5.0000000/1024;</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">Serial.print(LDR);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">Serial.print(" ");</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">Serial.print(VLDR);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">Serial.println ( "\t");</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">delay(2);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">if (LDR > 300 && LDR<325) {</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> tone(9,261.6,100);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(13, HIGH);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(12, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(2, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(3, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> </span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> </span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> }</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">if (LDR > 330 && LDR < 375) {</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> tone(9,293.7,100);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(13, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(12, HIGH);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(2, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(3, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> </span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> }</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> if (LDR > 380 && LDR < 460 ) {</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> tone(9,329.6,100);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(12, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(3, HIGH);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(13, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(2, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> }</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> if (LDR > 490 && LDR < 540 ) {</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> tone(9,349.2,100);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(3, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(2, HIGH);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(13, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(12, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> }</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> if (LDR > 570) {</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> tone(9,392.0,100);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(3, HIGH);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(2, HIGH);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(13, HIGH);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(12, HIGH);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> }</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
</div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
</div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">//toque a freqüência de 440 Hz (função tone no pino 9, com duração)</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">if (LDR < 290){</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(13, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(12, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(3, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> digitalWrite(2, LOW);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"> noTone(9);</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">}</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">//e não toque nada 9 noTone no pino 9; }</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;"><br />
</span></div>
<div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; line-height: 17px; text-align: -webkit-auto;">
<span style="background-color: white;">}</span></div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com1tag:blogger.com,1999:blog-5295762282775396798.post-60021977099282302582012-02-28T08:28:00.006-08:002012-05-14T14:27:57.961-07:00Roteiro 1 - Complementar<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/cKeEut6JSQU?feature=player_embedded' frameborder='0'></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="background-color: white;">- Programa usado: Arduino</b></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="background-color: white;"><br />
</b></div>
<div class="separator" style="clear: both; text-align: center;">
<b style="background-color: white;">- Código fonte:</b></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"><br />
</span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;">///</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;">int leitura; //define a variável leitura que corresponde a uma letra o teclado </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;">int tempo;</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;">void setup() { </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> pinMode(13, OUTPUT); //define que o pino 13 será uma saida </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> pinMode(4, OUTPUT);</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> pinMode(3, OUTPUT);</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> pinMode(A0, INPUT); </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> Serial.begin(9600); </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;">} </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"><br />
</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;">void loop() { </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"><br />
</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> leitura = analogRead(A0);</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> tempo= millis(); // base de tempo para a coleta </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> { </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> Serial.print(leitura); </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> } </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> Serial.println(); // imprime em linhas </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"><br />
</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> if (leitura <= 250) { </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> digitalWrite(13, LOW);</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> digitalWrite(4, LOW);</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> digitalWrite(3, LOW); </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> } </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> if (leitura > 250) { </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> digitalWrite(13, HIGH); </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> }</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> if ( leitura > 350){</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> digitalWrite(4, HIGH);</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> }</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> if ( leitura > 450){</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> digitalWrite(3, HIGH);</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> }</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white;">}</span></div>-http://www.blogger.com/profile/05571060607904937103noreply@blogger.com0