Display Some Pixels on LCD C12832

Dependencies:   C12832 mbed

main.cpp

Committer:
dwijaybane
Date:
2015-10-07
Revision:
1:045707712c1f
Parent:
0:8b93035ef74d

File content as of revision 1:045707712c1f:

#include "mbed.h"     // Basic Library required for onchip peripherals
#include "C12832.h"   // Library for SPI based LCD
 
/* Create Objects */ 
C12832 lcd(p5, p7, p6, p8, p11); // Initialize lcd object with SPI pins

/* Main Program */ 
int main()
{
    lcd.cls();          // Clear LCD Screen
    
    lcd.pixel(10,10,1); // first pixel
    lcd.pixel(11,11,1); // 2nd diagonal pixel
    lcd.pixel(12,12,1); // 3rd diagonal pixel
    lcd.pixel(13,13,1); // 4th diagonal pixel
    lcd.copy_to_lcd();  // This will print the pixels
    
    while(1);
}