/************************************************************************************************** * * LCD Class * * Version: 1.0.0 - September 2008 * Author: Etienne Ribeiro / tutorial assistant caad / eribeiro[at]ethz.ch * Supervisor: Christoph Wartmann / chair for caad - ETH Zürich / wartmann[at].arch.ethz.ch * * Desc: Library for an 14 Pin LCD Displays. * ***************************************************************************************************/ // LCD Class // by Etienne Ribeiro #include <LiquidCrystal.h> // CONST: const int rowsCount = 4; // Display Rows const int colsCount = 20; // Display Cols const int port = 3; // Port on Wiring Board const int pins[] = {37, 38, 39}; // Pins on Wiring Board // VAR LiquidCrystal myDisplay = LiquidCrystal(pins[0], pins[1], pins[2], port); int iLine = 0; // Methodes void Display_Clear(){ iLine = 0; myDisplay.clear(); myDisplay.home(); } void Display_Println(char str[]){ myDisplay.home(); myDisplay.setCursor(0, iLine); myDisplay.print(str); iLine += 1; } void Display_Println(char str[], char str2[]){ myDisplay.home(); myDisplay.setCursor(0, iLine); myDisplay.print(str); myDisplay.print(" "); myDisplay.print(str2); iLine += 1; } void Display_Println(char str[], int zahl){ myDisplay.home(); myDisplay.setCursor(0, iLine); myDisplay.print(str); myDisplay.print(" "); myDisplay.print(zahl); iLine += 1; } void Display_Println(char str1[], int zahl, char str2[]){ myDisplay.home(); myDisplay.setCursor(0, iLine); myDisplay.print(str1); myDisplay.print(" "); myDisplay.print(zahl); myDisplay.print(str2); iLine += 1; } void Display_Print(char str[]){ myDisplay.print(str); }