Utilizo Arduino uno, sistema operativo Mac os y tengo problema con los ejemplos de la Smartgpu2 el programa es:
#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:
Arcs:22: error: 'SMARTGPU2' does not name a type
Arcs.ino: In function 'void setup()':
Arcs:28: error: 'lcd' was not declared in this scope
Arcs.ino: In function 'void loop()':
Arcs:37: error: 'POINT' was not declared in this scope
Arcs:37: error: expected `;' before 'point'
Arcs:38: error: 'RADIUS' was not declared in this scope
Arcs:38: error: expected `;' before 'radiusx'
Arcs:39: error: 'COLOUR' was not declared in this scope
Arcs:39: error: expected `;' before 'colour'
Arcs:40: error: 'FILLGEOM' was not declared in this scope
Arcs:40: error: expected `;' before 'fill'
Arcs:43: error: 'lcd' was not declared in this scope
Arcs:43: error: 'BAUD6' was not declared in this scope
Arcs:47: error: 'point' was not declared in this scope
Arcs:47: error: 'LCD_WIDTH' was not declared in this scope
Arcs:48: error: 'LCD_HEIGHT' was not declared in this scope
Arcs:49: error: 'radiusx' was not declared in this scope
Arcs:50: error: 'radiusy' was not declared in this scope
Arcs:52: error: 'colour' was not declared in this scope
Arcs:53: error: 'fill' was not declared in this scope
Arcs:53: error: expected `;' before 'random'
Arcs:56: error: 'ARCQUADRANT' was not declared in this scope