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: RTC-DS1307 SPI_TFT_ILI9341 TFT_fonts mbed tsi_sensor
Fork of TFT_Mikroelectronika_IL9341_sketchpad by
Diff: render.h
- Revision:
- 9:eee503060d69
- Child:
- 10:9d9b3b9b28b8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/render.h	Wed May 24 03:11:29 2017 +0000
@@ -0,0 +1,50 @@
+#include "stdio.h"
+#include "SPI_TFT_ILI9341.h"
+#include "string"
+#include "Arial12x12.h"
+#include "Arial24x23.h"
+#include "Arial28x28.h"
+#include "font_big.h"
+
+// example to test the TFT Display from Mikroelectronika
+
+
+
+
+
+
+
+
+// the display has a backlight switch on board
+//DigitalOut LCD_LED(PTA4);   // may not be needed on mikroelectronika board
+//DigitalOut pwr(PTD7); // ditto
+
+// the TFT is connected to SPI pin 5-7
+//SPI_TFT_ILI9341 TFT(p5, p6, p7, p8, p9, p10,"TFT"); // mosi, miso, sclk, cs, reset, dc for lpc1768
+SPI_TFT_ILI9341 TFT(PTD6, PTD7, PTD5, PTD2, PTD4, PTA13,"TFT"); // mosi, miso, sclk, cs, reset, dc for frdmkl25z
+//NB better combination to use a coherent 2x4 block for lcd
+//   SPI_TFT_ILI9341 TFT(PTD2, PTD3, PTD1, PTA16, PTA17, PTC16,"TFT"); // mosi, miso, sclk, cs, reset, dc for frdmkl25z
+//   DigitalOut LCD_LED(PTC17);
+int touching=0;
+
+// Subroutine to read the x location of the touch point
+// need to set x+ to 3V and ground x- then read analogue voltage on ym
+//nb need to add a check for actual touch as opposed to random crap
+
+
+
+
+void drawbuttons()
+{
+  TFT.fillrect(0,0,50,50,Red);
+    TFT.fillrect(0,50,50,100,Green);
+    TFT.fillrect(0,100,50,150,Blue);
+    TFT.fillrect(0,150,50,200,White);
+    TFT.fillrect(0,200,50,250,Black);
+
+    TFT.rect(0,0,50,50,White);
+    TFT.rect(0,50,50,100,White);
+    TFT.rect(0,100,50,150,White);
+    TFT.rect(0,150,50,200,White);
+    TFT.rect(0,200,50,250,White);
+}
\ No newline at end of file
    