NUCLEO-F070R-DS1820

Dependencies:   mbed

Fork of NUCLEO-F401RE-DS1820andThermistorNTC10K by Enrico Marinoni

main.cpp

Committer:
anywill
Date:
2016-10-21
Revision:
6:7f43285de85b
Parent:
5:22fb02a92579

File content as of revision 6:7f43285de85b:

// Project: Nokia5110 - Controlling a NK5110 display from an NXP LPC1768
// File: main.cpp
// Author: Chris Yan
// Created: January, 2012
// Revised: 
//  Desc: A basic LCD output test which uses the NXP LPC1768's SPI interface to 
//      display pixels, characters, and numbers on the Nokia 5110 LCD.
//      Created using a sparkfun breakout board with integrated Phillips 8544 driver
//      for 48x84 LCDs.

#include "mbed.h"
#include "NOKIA_5110.h"

int main()
{
    // Init the data structures and NokiaLcd class
    LcdPins myPins;
    myPins.sce  = D8;
    myPins.rst  = D9;
    myPins.dc   = D10;
    myPins.mosi = D11;
    myPins.miso = NC;
    myPins.sclk = D13;//
    
    NokiaLcd myLcd( myPins );
    
    // Start the LCD
    myLcd.InitLcd();

    // Draw a test pattern on the LCD and stall for 15 seconds
    myLcd.TestLcd( 0xAA );
    wait( 15 );
    
    // Turn off the LCD and enter an endless loop
    myLcd.ShutdownLcd();
    while( 1 )
    {   
        //dance
    }
}