08.11.2017 Views

arduino_básico_Michael_McRoberts

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Capítulo 8 ■ Displays de cristal líquido<br />

199<br />

}<br />

lcd.print("Basic Print"); // Imprime algum texto<br />

delay(2000);<br />

void displayOnOffDemo() {<br />

lcd.clear();<br />

// Limpa o display<br />

lcd.print("Display On/Off"); // Imprime algum texto<br />

for(int x=0; x < 3; x++) { // Itera 3 vezes<br />

lcd.noDisplay(); // Apaga o display<br />

delay(1000);<br />

lcd.display();<br />

// Acende-o novamente<br />

delay(1000);<br />

}<br />

}<br />

void setCursorDemo() {<br />

lcd.clear();<br />

// Limpa o display<br />

lcd.print("SetCursor Demo"); // Imprime algum texto<br />

delay(1000);<br />

lcd.clear();<br />

// Limpa o display<br />

lcd.setCursor(5,0); // Cursor na coluna 5, linha 0<br />

lcd.print("5,0");<br />

delay(2000);<br />

lcd.setCursor(10,1); // Cursor na coluna 10, linha 1<br />

lcd.print("10,1");<br />

delay(2000);<br />

lcd.setCursor(3,1); // Cursor na coluna 3, linha 1<br />

lcd.print("3,1");<br />

delay(2000);<br />

}<br />

void scrollLeftDemo() {<br />

lcd.clear();<br />

// Limpa o display<br />

lcd.print("Scroll Left Demo");<br />

delay(1000);<br />

lcd.clear();<br />

// Limpa o display<br />

lcd.setCursor(7,0);<br />

lcd.print("Beginning");<br />

lcd.setCursor(9,1);<br />

lcd.print("Arduino");<br />

delay(1000);<br />

for(int x=0; x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!