Vizic Technologies
/
House
SMARTGPU drawing figures demo!
main.cpp
- Committer:
- emmanuelchio
- Date:
- 2011-09-14
- Revision:
- 0:8ab32fd6eb85
File content as of revision 0:8ab32fd6eb85:
/**************************************************************************************/ /*SMARTGPU intelligent embedded graphics processor unit those examples are for use the SMARTGPU with the mbed microcontoller, just connect tx,rx,and reset Board: http://www.vizictechnologies.com/#/desarrollo/4554296549 www.vizictechnologies.com Vizic Technologies copyright 2011 */ /**************************************************************************************/ /**************************************************************************************/ #include "mbed.h" #include "SMARTGPU.h" //Some colour definitions #define orange 0xFC0F #define brown 0xBBCA #define ligBlue 0x96DD SMARTGPU lcd(p13,p14,p15); //(TX,RX,Reset); int main() { lcd.reset(); //physically reset SMARTGPU lcd.start(); //initialize the SMARTGPU processor //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.drawCircle(195,187,10,ligBlue,FILL); //draw a circle lcd.drawCircle(195,187,10,BLACK,UNFILL); //draw a circle //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.drawCircle(35,120,35,GREEN,FILL); //draw a circle lcd.drawCircle(35,120,35,BLACK,UNFILL); //draw a circle //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); }