/**************************************************************************************************
*
*  Nokia LCD SGD-A
*
*   Version:      1.0.0 - January 2009
*   Author:       Christoph Wartmann / chair for caad - ETH Zürich  /  wartmann[at].arch.ethz.ch
*                 Etienne Ribeiro    / tutorial assistant caad      /  eribeiro[at]ethz.ch
*
*   Desc:         This Module shows the use of a Nokia LCD SGD-A. The Nokia LCD display has several
*                 additinal futures, build in speaker, ram and eeprom. Connect your Display to
*                 SerialPort2 (Pin 2 and 3 on Wiring-Board). RxTx Pins are crossed so connect
*                 Rx to Tx and Tx to Rx.
*
***************************************************************************************************/




void setup() {

        // LED (2 * blink)
        pinMode(48, OUTPUT);
        digitalWrite(48, HIGH);
        delay(200);
        digitalWrite(48, LOW);
        delay(200);
        digitalWrite(48, HIGH);


        // Start Serial (Nokia LCD SGD-A is interfaced through Serial1 (or Serial))
        startSerial();



        // LCD

        /*
        // - Test contrast
        LCDContrast (70);
        */

        // - Test Strings
        LCDClear (); // Clear LCD Display
        delay (60);
        LCDPrintln ("1 plus 1");
        LCDPrint ("gibt ");
        LCDPrintln (1 + 1);
        LCDPrintln ("");
        LCDPrint ("1 + 2 gibt ");
        LCDPrint (1 + 2);
        LCDPrintln ("");

        /*
        // - Test Painting
        LCDClear (); // Clear LCD Display
        delay (60);
        LCDLine (30, 31, 42, 11);
        delay (60);
        LCDLine (43, 31, 52, 16);
        delay (60);
        LCDLineTo (20, 20);
        delay (60);
        LCDLineTo (34, 32);
        */



        // SPEICHER

        /*
        // - Test Ram
        Serial.begin(9600);
        RAM_Write (10, 100); // address: 0 to 63, value: 0 to 255
        int val = RAM_Read (10); // address: 0 to 63
        Serial.println(val);


        // - Test EEPROM
        // (Don't use EEPROM if you don't need it! EEPROM can only be written limited times!
        //Serial.begin(9600);
        //EEPROM_Write (10, 100); // address: 0 to 63, value: 0 to 255
        //int val = EEPROM_Read (10); // address: 0 to 63
        //Serial.println(val);
        */





        // SOUND

        /*
        // - Test Sound
        SPKBeep ();
        delay (300);
        SPKBeep (12, 249, 100);//  frequenceP: 1 - 16, frequenceE: 0 - 255, durantion_ms: 0 - 2065
        delay (300);
        SPKBeep ();
        */



        /*
        // INFOS

        // - Print firmware release
        FirmwareRelease ();
        */



}

void loop() {
}

This website has been archived and is no longer maintained.