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.
Revision 0:0d74947da8fd, committed 2013-07-10
- Comitter:
- emmanuelchio
- Date:
- Wed Jul 10 03:32:21 2013 +0000
- Child:
- 1:c85930630fc5
- Commit message:
- House Drawing Demo - MBED + SmartGPU2 board
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SMARTGPU2.lib Wed Jul 10 03:32:21 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/emmanuelchio/code/SMARTGPU2/#210b5ba62803
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Jul 10 03:32:21 2013 +0000
@@ -0,0 +1,69 @@
+/**************************************************************************************/
+/*SMARTGPU2 intelligent embedded graphics processor unit
+ those examples are for use the SMARTGPU2 with the mbed microcontoller, just connect tx,rx,and reset
+ Board:
+ http://vizictechnologies.com/#/smart-gpu-2/4577779046
+
+ www.vizictechnologies.com
+ Vizic Technologies copyright 2013 */
+/**************************************************************************************/
+/**************************************************************************************/
+
+#include "mbed.h"
+#include "SMARTGPU2.h"
+
+#define orange 0xFC0F
+#define brown 0xBBCA
+#define ligBlue 0x96DD
+
+SMARTGPU2 lcd(TXPIN,RXPIN,RESETPIN); //create our object called "lcd"
+
+/***************************************************/
+/***************************************************/
+void initializeSmartGPU2(void){ //Initialize SMARTGPU2 Board
+ lcd.reset(); //physically reset SMARTGPU2
+ lcd.start(); //initialize the SMARTGPU2 processor
+}
+
+/***************************************************/
+/***************************************************/
+/***************************************************/
+/***************************************************/
+int main() {
+
+ initializeSmartGPU2(); //Init communication with SmartGPU2 board
+
+ lcd.baudChange(BAUD7); //set a fast baud! for fast drawing
+
+ //draw a background
+ lcd.drawGradientRect(0,0,319,239,BLUE,BLACK,VERTICAL); //draw a gradient rectangle
+
+ //draw the house
+ lcd.drawRectangle(78,134,212,217,orange,FILL); //draw a rectangle
+ lcd.drawRectangle(78,134,212,217,BLACK,UNFILL); //draw a rectangle
+ lcd.drawTriangle(75,133,216,133,146,63,RED,FILL); //draw a triangle
+ lcd.drawTriangle(75,133,216,133,146,63,BLACK,UNFILL); //draw a triangle
+ lcd.drawRectangle(136,167,170,217,brown,FILL); //draw a rectangle
+ lcd.drawRectangle(136,167,170,217,BLACK,UNFILL); //draw a rectangle
+ lcd.drawCircle(106,160,15,ligBlue,FILL); //draw a circle
+ lcd.drawCircle(106,160,15,BLACK,UNFILL); //draw a circle
+ lcd.drawEllipse(195,177,10,15,ligBlue,FILL); //draw an ellipse
+ lcd.drawEllipse(195,177,10,15,BLACK,UNFILL); //draw an ellipse
+
+ //draw left tree
+ lcd.drawRectangle(25,157,45,218,brown,FILL); //draw a rectangle
+ lcd.drawRectangle(25,157,45,218,BLACK,UNFILL); //draw a rectangle
+ lcd.drawEllipse(35,120,35,40,GREEN,FILL); //draw an ellipse
+ lcd.drawEllipse(35,120,35,40,BLACK,UNFILL); //draw an ellipse
+ //draw right tree
+ lcd.drawRectangle(270,167,283,218,brown,FILL); //draw a rectangle
+ lcd.drawRectangle(270,167,283,218,BLACK,UNFILL); //draw a rectangle
+ lcd.drawCircle(277,134,35,GREEN,FILL); //draw a circle
+ lcd.drawCircle(277,134,35,BLACK,UNFILL); //draw a circle
+
+ //draw grass
+ lcd.drawLine(5,218,314,218,GREEN); //draw a line
+
+ //loop forever
+ while(1);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jul 10 03:32:21 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17 \ No newline at end of file