Mini SmartGPU Intelligent Graphics Processor- Vizic Technologies 2012

Dependencies:   MINISMARTGPU mbed

Committer:
emmanuelchio
Date:
Thu Aug 30 21:57:10 2012 +0000
Revision:
0:f493c47f6159
Mini SmartGPU Intelligent Graphics Processor- Vizic Technologies 2012

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emmanuelchio 0:f493c47f6159 1 /*********************************************************
emmanuelchio 0:f493c47f6159 2 VIZIC TECHNOLOGIES. COPYRIGHT 2012.
emmanuelchio 0:f493c47f6159 3 THE DATASHEETS, SOFTWARE AND LIBRARIES ARE PROVIDED "AS IS."
emmanuelchio 0:f493c47f6159 4 VIZIC EXPRESSLY DISCLAIM ANY WARRANTY OF ANY KIND, WHETHER
emmanuelchio 0:f493c47f6159 5 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED
emmanuelchio 0:f493c47f6159 6 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
emmanuelchio 0:f493c47f6159 7 OR NONINFRINGEMENT. IN NO EVENT SHALL VIZIC BE LIABLE FOR
emmanuelchio 0:f493c47f6159 8 ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
emmanuelchio 0:f493c47f6159 9 LOST PROFITS OR LOST DATA, HARM TO YOUR EQUIPMENT, COST OF
emmanuelchio 0:f493c47f6159 10 PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES,
emmanuelchio 0:f493c47f6159 11 ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO
emmanuelchio 0:f493c47f6159 12 ANY DEFENCE THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION,
emmanuelchio 0:f493c47f6159 13 OR OTHER SIMILAR COSTS.
emmanuelchio 0:f493c47f6159 14 *********************************************************/
emmanuelchio 0:f493c47f6159 15 /**************************************************************************************/
emmanuelchio 0:f493c47f6159 16 /*MINI SMARTGPU intelligent embedded graphics processor unit
emmanuelchio 0:f493c47f6159 17 those examples are for use the MINI SMARTGPU with the mbed microcontoller, just connect tx,rx,and reset
emmanuelchio 0:f493c47f6159 18 Board:
emmanuelchio 0:f493c47f6159 19 http://vizictechnologies.com/#/mini-smart-gpu/4566376187
emmanuelchio 0:f493c47f6159 20
emmanuelchio 0:f493c47f6159 21 www.vizictechnologies.com
emmanuelchio 0:f493c47f6159 22 Vizic Technologies copyright 2012*/
emmanuelchio 0:f493c47f6159 23 /**************************************************************************************/
emmanuelchio 0:f493c47f6159 24 /**************************************************************************************/
emmanuelchio 0:f493c47f6159 25
emmanuelchio 0:f493c47f6159 26 #include "mbed.h"
emmanuelchio 0:f493c47f6159 27 #include "MINISMARTGPU.h"
emmanuelchio 0:f493c47f6159 28
emmanuelchio 0:f493c47f6159 29 MINISMARTGPU lcd(p13,p14,p15); //(TX,RX,Reset); Create Object "lcd"
emmanuelchio 0:f493c47f6159 30
emmanuelchio 0:f493c47f6159 31 char imagesOnSDCard[11][9]={"tulips","penguins","abstract","nature","cube","sunset","drop","fractal","jelly","koala","flower"}; //array containing the names of the different called images
emmanuelchio 0:f493c47f6159 32
emmanuelchio 0:f493c47f6159 33 /**********************************************************************************/
emmanuelchio 0:f493c47f6159 34 /**********************************************************************************/
emmanuelchio 0:f493c47f6159 35 /**********************************************************************************/
emmanuelchio 0:f493c47f6159 36 int main() {
emmanuelchio 0:f493c47f6159 37 char pic=0;
emmanuelchio 0:f493c47f6159 38
emmanuelchio 0:f493c47f6159 39 lcd.reset(); //physically reset MINISMARTGPU
emmanuelchio 0:f493c47f6159 40 lcd.start(); //initialize the MINISMARTGPU processor
emmanuelchio 0:f493c47f6159 41 wait_ms(200);
emmanuelchio 0:f493c47f6159 42
emmanuelchio 0:f493c47f6159 43 while(1){ //Loop forever in the slide show!
emmanuelchio 0:f493c47f6159 44 lcd.imageSD(0,0,imagesOnSDCard[pic]); //Load image from SD card, all images are 160x128(full screen) so we load them from top left corner X:0,Y:0
emmanuelchio 0:f493c47f6159 45
emmanuelchio 0:f493c47f6159 46 //Wait some seconds to change slide
emmanuelchio 0:f493c47f6159 47 wait_ms(2000);
emmanuelchio 0:f493c47f6159 48
emmanuelchio 0:f493c47f6159 49 pic++; //increase image selector
emmanuelchio 0:f493c47f6159 50 if(pic>10){ //if we reach the position of the last image, we restart to image 0
emmanuelchio 0:f493c47f6159 51 pic=0;
emmanuelchio 0:f493c47f6159 52 }
emmanuelchio 0:f493c47f6159 53 }
emmanuelchio 0:f493c47f6159 54 }