Ellipses - MBED + SmartGPU2 board

Dependencies:   SMARTGPU2 mbed

Files at this revision

API Documentation at this revision

Comitter:
emmanuelchio
Date:
Wed Jul 10 03:27:38 2013 +0000
Child:
1:974361f7ce8c
Commit message:
Ellipses - MBED + SmartGPU2 board

Changed in this revision

SMARTGPU2.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SMARTGPU2.lib	Wed Jul 10 03:27:38 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:27:38 2013 +0000
@@ -0,0 +1,51 @@
+/**************************************************************************************/
+/*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"
+
+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() {
+  POINT point;
+  RADIUS radiusx, radiusy;
+  COLOUR colour;
+  FILLGEOM fill;
+      
+  initializeSmartGPU2();             //Init communication with SmartGPU2 board
+  
+  lcd.baudChange(BAUD7);             //set a fast baud! for fast drawing
+  
+  while(1){//forever
+    point.x= (rand()%LCD_WIDTH);   //get a random number 0-319
+    point.y= (rand()%LCD_HEIGHT);  //get a random number 0-239
+    radiusx= (rand()%81)+1;        //get a random number 1-80
+    radiusy= (rand()%81)+1;        //get a random number 1-80      
+    colour=  (rand()%65536);       //get a random number 0-65535
+    fill=(FILLGEOM)(rand()%2);     //get a random number 0-1
+    
+    //draw the Ellipse
+    if(lcd.drawEllipse(point.x,point.y,radiusx,radiusy,colour,fill) != 'O'){  //draw an Ellipse
+      while(1);                    //loop forever if different than 'O'--OK
+    }      
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jul 10 03:27:38 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file