Go Down

### Topic: Problema con libreria de Smartgpu2 (Read 1 time)previous topic - next topic

#### Vampiresheryl

##### Apr 18, 2014, 06:02 amLast Edit: Apr 18, 2014, 09:34 am by leo72 Reason: 1
Utilizo Arduino uno, sistema operativo Mac os y tengo problema con los ejemplos de la Smartgpu2 el programa es:

Code: [Select]
`#include <SMARTGPU2.h>     //include the SMARTGPU2 library!SMARTGPU2 lcd;             //create our object called LCD/*********************************************************//*********************************************************/void setup() { //initial setup  //Those two functions must always be called for SMARTGPU2 support  lcd.init();  //configure the serial and pinout of arduino board for SMARTGPU2 support  lcd.start(); //initialize the SMARTGPU2 processor}/*********************************************************//*********************************************************//*********************************************************//*********************************************************/void loop() { //main loop draw random colour, size and fill Arcs    POINT point;    RADIUS radiusx, radiusy;    COLOUR colour;    FILLGEOM fill;    unsigned int quadrant;        lcd.baudChange(BAUD6);           //for fast drawing we need a big baudRate        while(1){//forever      randomSeed(random(0,65536));   //set different seeds to obtain a good random number      point.x=random(0,LCD_WIDTH);   //get a random number 0-319      point.y=random(0,LCD_HEIGHT);  //get a random number 0-239      radiusx=random(5,101);         //get a random number 5-100      radiusy=random(5,101);         //get a random number 5-100      quadrant=random(1,5);          //get a random number 1-4      colour=random(0,65536);        //get a random number 0-65535      fill=(FILLGEOM)random(0,2);    //get a random number 0-1            //draw the Arc      if(lcd.drawArc(point.x, point.y, radiusx, radiusy, (ARCQUADRANT)quadrant, colour, fill) != 'O'){  //draw an Arc        while(1);                    //loop forever if different than 'O'--OK      }          }}`

y los problemas son casi similares en todos los ejemplos:
Code: [Select]
`Arcs:22: error: 'SMARTGPU2' does not name a typeArcs.ino: In function 'void setup()':Arcs:28: error: 'lcd' was not declared in this scopeArcs.ino: In function 'void loop()':Arcs:37: error: 'POINT' was not declared in this scopeArcs:37: error: expected `;' before 'point'Arcs:38: error: 'RADIUS' was not declared in this scopeArcs:38: error: expected `;' before 'radiusx'Arcs:39: error: 'COLOUR' was not declared in this scopeArcs:39: error: expected `;' before 'colour'Arcs:40: error: 'FILLGEOM' was not declared in this scopeArcs:40: error: expected `;' before 'fill'Arcs:43: error: 'lcd' was not declared in this scopeArcs:43: error: 'BAUD6' was not declared in this scopeArcs:47: error: 'point' was not declared in this scopeArcs:47: error: 'LCD_WIDTH' was not declared in this scopeArcs:48: error: 'LCD_HEIGHT' was not declared in this scopeArcs:49: error: 'radiusx' was not declared in this scopeArcs:50: error: 'radiusy' was not declared in this scopeArcs:52: error: 'colour' was not declared in this scopeArcs:53: error: 'fill' was not declared in this scopeArcs:53: error: expected `;' before 'random'Arcs:56: error: 'ARCQUADRANT' was not declared in this scope`

#### noter

#1
##### Apr 18, 2014, 03:36 pm
Tiene toda la pinta de que no has colocado la librería en el lugar correcto. El archivo SMARTGPU2.h debería estar en la carpeta Arduino/libraries/SMARTGPU2/SMARTGPU2.h. Revisa no hayas creado alguna subcarpeta de más al descomprimir la librería.
Saludos.

#### Vampiresheryl

#2
##### Apr 19, 2014, 02:12 am
noter, muchas gracias tenias razón la mayoría de los errores se han solucionado pero aun me marca como error:

In file included from Arcs.ino:20:
/Applications/Arduino 4.app/Contents/Resources/Java/libraries/SMARTGPU2/SMARTGPU2.h:69:2: error: #error "No smartGPU2 LCDXXXxXXX board defined in smartGPU2.h file"
Arcs.ino: In function 'void loop()':
Arcs:47: error: 'LCD_WIDTH' was not declared in this scope
Arcs:48: error: 'LCD_HEIGHT' was not declared in this scope

Disculpa mi ignorancia.

#### noter

#3
##### Apr 19, 2014, 04:14 pm
Pues viene a decir que no has definido qué dispositivo estás utilizando.
Creo que tienes que editar SMARTGPU2.h (usa un editor de texto) y descomentar la línea que corresponde a tu modelo.

#### Vampiresheryl

#4
##### Apr 19, 2014, 10:45 pm
Gracias noter, ya todo esta en orden, te estoy muy agradecida.

#### noter

#5
##### Apr 19, 2014, 11:10 pm
Bien está lo que bien acaba. Me alegro de haberte sido de ayuda.
Sería conveniente que cambiaras el asunto del post, precediéndolo de [SOLUCIONADO].
Saludos.

Go Up