Codigo de Liquidcrystal
Codigo de Liquidcrystal
h>
BEFORE including the
ParallaxLCD.h header
*/
#include <SoftwareSerial.h>
#include <ParallaxLCD.h>
// Change these values if
you're using the 4x20 LCD
#define ROWS 2
#define COLS 16
ParallaxLCD
lcd(2,ROWS,COLS); // desired
pin, rows, cols
/**
* Initialize the 2-dimensional
custom character byte array.
* Even though each 'byte' is 0255, only the lowest 5 bytes
are used. So only
* 0-31 are valid values.
*/
byte customCharacters[8][8] =
{0, 4, 14, 31, 14, 4, 0, 0, //
Diamond
0, 10, 14,
31, 31, 14, 4, 0, // Heart
0, 4, 14,
31, 14, 4, 14, 0, // Spade
4, 14, 4,
10, 31, 10, 4, 14, // Club
(sorta...)
4, 14, 21,
4, 4, 4, 4, 4,
// Up
4, 4, 4, 4,
4, 21, 14, 4,
// Down
27, 22, 13,
lcd.at(0,0,"m:\0");
for (int b=0; b<=100; b+=5)
{
lcd.at(0,2,millis());
delay(500);
}
// Line feeds
lcd.empty();
lcd.print("Line Feed\0");
for (int b=0; b<=50; b+=5) {
lcd.lf();
delay(500);
}
// Carriage Returns
lcd.empty();
lcd.print("Chr Return\0");
delay(1000);
for (int b=0; b<=30; b+=5) {
lcd.pos(0,10);
delay(500);
lcd.cr();
delay(500);
}
// Diferent cursors
lcd.empty();
lcd.cursorBlock();
lcd.print("Block Cursor\0");