Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TFTLCD_8bit mbed
Diff: main.cpp
- Revision:
- 3:86f4425affe5
- Parent:
- 2:bfdbc88d37bf
- Child:
- 4:471d7c5e8360
--- a/main.cpp	Mon Apr 07 16:53:59 2014 +0000
+++ b/main.cpp	Wed Apr 16 14:49:07 2014 +0000
@@ -1,6 +1,6 @@
 #include "mbed.h"
 #include "ili9325.h"
-
+#include "lcd_base.h"
 // prepare the data bus for writing commands and pixel data
 //BusOut dataBus( p30, p29, p28, p27, p26, p25, p24, p23, p22, p21, p20, p19, p18, p17, p16, p15 ); // 16 pins
 BusOut dataBus( PTA13, PTD5, PTD4, PTA12, PTA4, PTA5, PTC8, PTC9 ); // 16 pins
@@ -9,23 +9,47 @@
 //CS, RESET, RS, WR
 int main()
 {
+    int ii;
+    unsigned short height = lcd.GetHeight();
+    unsigned short width = lcd.GetWidth();
+    
     // initialize display - place it in standard portrait mode and set background to black and
     //                      foreground to white color.
+    //lcd.Initialize(LANDSCAPE,RGB18);
     lcd.Initialize();
 
     lcd.FillScreen(COLOR_GREEN);
     // set current font to the smallest 8x12 pixels font.
 //    lcd.SetFont( Font8x12 );
     // print something on the screen
-    lcd.Print( "Thiha Electronics", CENTER, CENTER, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
 
+    lcd.Print( "Thiha Electronics", CENTER, 0, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
     lcd.Print( "Using KL25Z on mbed", CENTER, 300, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
-
     lcd.Print( "Code @ users/", CENTER, 600, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
+    lcd.Print( "/ThihaElectronics/", CENTER, 900, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
+    lcd.Print( "KL25Z_ILI9325/", CENTER, 1200, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
+    
+    wait(2);
+    
+    lcd.ClearScreen();
 
-    lcd.Print( "/ThihaElectronics/", CENTER, 900, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
+//    for(ii=0;ii<240;ii++)
+//    height = lcd.GetHeight();
+//    for(ii=0;ii<lcd.GetHeight1();ii++)
+    for(ii=0;ii<width;ii++)
+    {
+//        lcd.DrawLine(0, 0, lcd.GetWidth1(), ii,COLOR_GREEN);
+        lcd.DrawLine(0, 0, height, ii,COLOR_GREEN);
+//        lcd.DrawLine(0, 0, 320, ii,COLOR_GREEN);
+        ii = ii+10;    
+    }
 
-    lcd.Print( "KL25Z_ILI9325/", CENTER, 1200, -2,COLOR_GREEN); // align text to center horizontally and use starndard colors
+    lcd.DrawCircle(height/4, width/4, 20, COLOR_GREEN);
+
+    lcd.FillCircle(height/2, width/2, 50, COLOR_GREEN);
+
+    lcd.FillTriangle(height/4, width/4,(height/4)+20, (width/4)+40,(height/4)-20, (width/4)+40, COLOR_RED);
+
 
     while ( 1 ) { }
 }
\ No newline at end of file