Go Down

Topic: Robot_Control\ArduinoRobot.cpp errors (Read 27641 times) previous topic - next topic

Abubakar022

i want to upload the code for tft lcd which i bought from ebay but when i try to upload it gives some errors which i don't know how to fix.
here are the errors....
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp: In constructor 'RobotControl::RobotControl()':
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'LCD_CS' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'DC_LCD' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'RST_LCD' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp: In member function 'void RobotControl::begin()':
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXA' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXB' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXC' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXD' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:19: error: 'MUX_IN' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:22: error: 'BUZZ' was not declared in this scope
C:\Users\Abubakr\Desktop\arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:25: error: 'Serial1' was not declared in this scope

johnwasser

Are you using the Arduino robot board?

http://arduino.cc/en/Main/Robot

If not, don't use the Robot_Control library.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

dougleppard

Thanks for posting this solution.  I had the same exact problem.

I am using adafruits LCD board.  Everything was working fine until I upgraded to 1.0.5 and when I complied I got the above errors.

So I went in and removed the directory Robot_Control that came with 1.0.5 figuring it was finding files in that directory instead of the ones I wanted it to find.

Now it compiles fine.

Doug

WaxFlywheel

#3
Jun 17, 2013, 04:07 am Last Edit: Jun 17, 2013, 04:14 am by WaxFlywheel Reason: 1
I am using adafruits LCD board.  Everything was working fine until I upgraded to 1.0.5 and when I complied I got the above errors.

So I went in and removed the directory Robot_Control that came with 1.0.5 figuring it was finding files in that directory instead of the ones I wanted it to find.

I can also confirm I am having this same problem with version 1.0.5

I'm using an Uno board.

====
As opposed to Doug, I removed the /Robot_Control, and now it doesn't give me those errors... yet it gives me a whole different set of errors:
Code: [Select]
In file included from pcdtest.pde:20:
C:\Documents and Settings\Administrator\My Documents\Arduino\libraries\Adafruit_PCD8544/Adafruit_PCD8544.h:52: error: expected class-name before '{' token
pcdtest.pde: In function 'void setup()':
pcdtest:101: error: 'class Adafruit_PCD8544' has no member named 'fillCircle'
pcdtest:101: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:101: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:129: error: 'class Adafruit_PCD8544' has no member named 'setTextSize'
pcdtest:130: error: 'class Adafruit_PCD8544' has no member named 'setTextColor'
pcdtest:131: error: 'class Adafruit_PCD8544' has no member named 'setCursor'
pcdtest:132: error: 'class Adafruit_PCD8544' has no member named 'println'
pcdtest:133: error: 'class Adafruit_PCD8544' has no member named 'setTextColor'
pcdtest:134: error: 'class Adafruit_PCD8544' has no member named 'println'
pcdtest:135: error: 'class Adafruit_PCD8544' has no member named 'setTextSize'
pcdtest:136: error: 'class Adafruit_PCD8544' has no member named 'setTextColor'
pcdtest:137: error: 'class Adafruit_PCD8544' has no member named 'print'
pcdtest:137: error: 'class Adafruit_PCD8544' has no member named 'println'
pcdtest:143: error: 'class Adafruit_PCD8544' has no member named 'drawBitmap'
pcdtest:147: error: 'class Adafruit_PCD8544' has no member named 'invertDisplay'
pcdtest:149: error: 'class Adafruit_PCD8544' has no member named 'invertDisplay'
pcdtest.pde: In function 'void testdrawbitmap(const uint8_t*, uint8_t, uint8_t)':
pcdtest:168: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:183: error: 'class Adafruit_PCD8544' has no member named 'drawBitmap'
pcdtest:190: error: 'class Adafruit_PCD8544' has no member named 'drawBitmap'
pcdtest:194: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:195: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest.pde: In function 'void testdrawchar()':
pcdtest:205: error: 'class Adafruit_PCD8544' has no member named 'setTextSize'
pcdtest:206: error: 'class Adafruit_PCD8544' has no member named 'setTextColor'
pcdtest:207: error: 'class Adafruit_PCD8544' has no member named 'setCursor'
pcdtest:211: error: 'class Adafruit_PCD8544' has no member named 'write'
pcdtest.pde: In function 'void testdrawcircle()':
pcdtest:219: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:220: error: 'class Adafruit_PCD8544' has no member named 'drawCircle'
pcdtest:220: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:220: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest.pde: In function 'void testfillrect()':
pcdtest:227: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:229: error: 'class Adafruit_PCD8544' has no member named 'fillRect'
pcdtest:229: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:229: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest.pde: In function 'void testdrawtriangle()':
pcdtest:236: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:236: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:236: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:236: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:237: error: 'class Adafruit_PCD8544' has no member named 'drawTriangle'
pcdtest:237: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:237: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:238: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:238: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:239: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:239: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest.pde: In function 'void testfilltriangle()':
pcdtest:246: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:246: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:246: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:246: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:247: error: 'class Adafruit_PCD8544' has no member named 'fillTriangle'
pcdtest:247: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:247: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:248: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:248: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:249: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:249: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest.pde: In function 'void testdrawroundrect()':
pcdtest:257: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:258: error: 'class Adafruit_PCD8544' has no member named 'drawRoundRect'
pcdtest:258: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:258: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:258: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest.pde: In function 'void testfillroundrect()':
pcdtest:265: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:266: error: 'class Adafruit_PCD8544' has no member named 'fillRoundRect'
pcdtest:266: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:266: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:266: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest.pde: In function 'void testdrawrect()':
pcdtest:274: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:275: error: 'class Adafruit_PCD8544' has no member named 'drawRect'
pcdtest:275: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:275: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest.pde: In function 'void testdrawline()':
pcdtest:281: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:282: error: 'class Adafruit_PCD8544' has no member named 'drawLine'
pcdtest:282: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:285: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:286: error: 'class Adafruit_PCD8544' has no member named 'drawLine'
pcdtest:286: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:292: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:293: error: 'class Adafruit_PCD8544' has no member named 'drawLine'
pcdtest:293: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:296: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:297: error: 'class Adafruit_PCD8544' has no member named 'drawLine'
pcdtest:297: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:297: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:303: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:304: error: 'class Adafruit_PCD8544' has no member named 'drawLine'
pcdtest:304: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:304: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:307: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:308: error: 'class Adafruit_PCD8544' has no member named 'drawLine'
pcdtest:308: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:308: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:314: error: 'class Adafruit_PCD8544' has no member named 'height'
pcdtest:315: error: 'class Adafruit_PCD8544' has no member named 'drawLine'
pcdtest:315: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:318: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:319: error: 'class Adafruit_PCD8544' has no member named 'drawLine'
pcdtest:319: error: 'class Adafruit_PCD8544' has no member named 'width'
pcdtest:319: error: 'class Adafruit_PCD8544' has no member named 'height'

PaulS

Quote
In file included from pcdtest.pde
and 1.0.5 do not go together. Post 1.0 uses ino files.

Links to the libraries you are using, and ALL of your code, would be good.
The art of getting good answers lies in asking good questions.

WaxFlywheel

Hello PaulS,

Thanks for the help!
I'm a n00b at this... so I'm not sure what's going on.

The file I'm trying to compile is called pcdtest
It popped up under Exampled after I Imported both Adafruit libraries.

Here is a link to the Adafruit PCD8544 library over on github.
Here is a link to the Adafruit GFX library over on github.

The actual code of the pcdtest is the following:
Code: [Select]
/*********************************************************************
This is an example sketch for our Monochrome Nokia 5110 LCD Displays

 Pick one up today in the adafruit shop!
 ------> http://www.adafruit.com/products/338

These displays use SPI to communicate, 4 or 5 pins are required to
interface

Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada  for Adafruit Industries.
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution
*********************************************************************/

#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>

// pin 7 - Serial clock out (SCLK)
// pin 6 - Serial data out (DIN)
// pin 5 - Data/Command select (D/C)
// pin 4 - LCD chip select (CS)
// pin 3 - LCD reset (RST)
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2


#define LOGO16_GLCD_HEIGHT 16
#define LOGO16_GLCD_WIDTH  16

static unsigned char PROGMEM logo16_glcd_bmp[] =
{ B00000000, B11000000,
 B00000001, B11000000,
 B00000001, B11000000,
 B00000011, B11100000,
 B11110011, B11100000,
 B11111110, B11111000,
 B01111110, B11111111,
 B00110011, B10011111,
 B00011111, B11111100,
 B00001101, B01110000,
 B00011011, B10100000,
 B00111111, B11100000,
 B00111111, B11110000,
 B01111100, B11110000,
 B01110000, B01110000,
 B00000000, B00110000 };

void setup()   {
 Serial.begin(9600);

 display.begin();
 // init done

 // you can change the contrast around to adapt the display
 // for the best viewing!
 display.setContrast(50);

 display.display(); // show splashscreen
 delay(2000);
 display.clearDisplay();   // clears the screen and buffer

 // draw a single pixel
 display.drawPixel(10, 10, BLACK);
 display.display();
 delay(2000);
 display.clearDisplay();

 // draw many lines
 testdrawline();
 display.display();
 delay(2000);
 display.clearDisplay();

 // draw rectangles
 testdrawrect();
 display.display();
 delay(2000);
 display.clearDisplay();

 // draw multiple rectangles
 testfillrect();
 display.display();
 delay(2000);
 display.clearDisplay();

 // draw mulitple circles
 testdrawcircle();
 display.display();
 delay(2000);
 display.clearDisplay();

 // draw a circle, 10 pixel radius
 display.fillCircle(display.width()/2, display.height()/2, 10, BLACK);
 display.display();
 delay(2000);
 display.clearDisplay();

 testdrawroundrect();
 delay(2000);
 display.clearDisplay();

 testfillroundrect();
 delay(2000);
 display.clearDisplay();

 testdrawtriangle();
 delay(2000);
 display.clearDisplay();
 
 testfilltriangle();
 delay(2000);
 display.clearDisplay();

 // draw the first ~12 characters in the font
 testdrawchar();
 display.display();
 delay(2000);
 display.clearDisplay();

 // text display tests
 display.setTextSize(1);
 display.setTextColor(BLACK);
 display.setCursor(0,0);
 display.println("Hello, world!");
 display.setTextColor(WHITE, BLACK); // 'inverted' text
 display.println(3.141592);
 display.setTextSize(2);
 display.setTextColor(BLACK);
 display.print("0x"); display.println(0xDEADBEEF, HEX);
 display.display();
 delay(2000);

 // miniature bitmap display
 display.clearDisplay();
 display.drawBitmap(30, 16,  logo16_glcd_bmp, 16, 16, 1);
 display.display();

 // invert the display
 display.invertDisplay(true);
 delay(1000);
 display.invertDisplay(false);
 delay(1000);

 // draw a bitmap icon and 'animate' movement
 testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH);
}


void loop() {
 
}


void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) {
 uint8_t icons[NUMFLAKES][3];
 srandom(666);     // whatever seed

 // initialize
 for (uint8_t f=0; f< NUMFLAKES; f++) {
   icons[f][XPOS] = random() % display.width();
   icons[f][YPOS] = 0;
   icons[f][DELTAY] = random() % 5 + 1;
   
   Serial.print("x: ");
   Serial.print(icons[f][XPOS], DEC);
   Serial.print(" y: ");
   Serial.print(icons[f][YPOS], DEC);
   Serial.print(" dy: ");
   Serial.println(icons[f][DELTAY], DEC);
 }

 while (1) {
   // draw each icon
   for (uint8_t f=0; f< NUMFLAKES; f++) {
     display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, BLACK);
   }
   display.display();
   delay(200);
   
   // then erase it + move it
   for (uint8_t f=0; f< NUMFLAKES; f++) {
     display.drawBitmap(icons[f][XPOS], icons[f][YPOS],  logo16_glcd_bmp, w, h, WHITE);
     // move it
     icons[f][YPOS] += icons[f][DELTAY];
     // if its gone, reinit
     if (icons[f][YPOS] > display.height()) {
icons[f][XPOS] = random() % display.width();
icons[f][YPOS] = 0;
icons[f][DELTAY] = random() % 5 + 1;
     }
   }
  }
}


void testdrawchar(void) {
 display.setTextSize(1);
 display.setTextColor(BLACK);
 display.setCursor(0,0);

 for (uint8_t i=0; i < 168; i++) {
   if (i == '\n') continue;
   display.write(i);
   //if ((i > 0) && (i % 14 == 0))
     //display.println();
 }    
 display.display();
}

void testdrawcircle(void) {
 for (int16_t i=0; i<display.height(); i+=2) {
   display.drawCircle(display.width()/2, display.height()/2, i, BLACK);
   display.display();
 }
}

void testfillrect(void) {
 uint8_t color = 1;
 for (int16_t i=0; i<display.height()/2; i+=3) {
   // alternate colors
   display.fillRect(i, i, display.width()-i*2, display.height()-i*2, color%2);
   display.display();
   color++;
 }
}

void testdrawtriangle(void) {
 for (int16_t i=0; i<min(display.width(),display.height())/2; i+=5) {
   display.drawTriangle(display.width()/2, display.height()/2-i,
                    display.width()/2-i, display.height()/2+i,
                    display.width()/2+i, display.height()/2+i, BLACK);
   display.display();
 }
}

void testfilltriangle(void) {
 uint8_t color = BLACK;
 for (int16_t i=min(display.width(),display.height())/2; i>0; i-=5) {
   display.fillTriangle(display.width()/2, display.height()/2-i,
                    display.width()/2-i, display.height()/2+i,
                    display.width()/2+i, display.height()/2+i, color);
   if (color == WHITE) color = BLACK;
   else color = WHITE;
   display.display();
 }
}

void testdrawroundrect(void) {
 for (int16_t i=0; i<display.height()/2-2; i+=2) {
   display.drawRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, BLACK);
   display.display();
 }
}

void testfillroundrect(void) {
 uint8_t color = BLACK;
 for (int16_t i=0; i<display.height()/2-2; i+=2) {
   display.fillRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, color);
   if (color == WHITE) color = BLACK;
   else color = WHITE;
   display.display();
 }
}
 
void testdrawrect(void) {
 for (int16_t i=0; i<display.height()/2; i+=2) {
   display.drawRect(i, i, display.width()-2*i, display.height()-2*i, BLACK);
   display.display();
 }
}

void testdrawline() {  
 for (int16_t i=0; i<display.width(); i+=4) {
   display.drawLine(0, 0, i, display.height()-1, BLACK);
   display.display();
 }
 for (int16_t i=0; i<display.height(); i+=4) {
   display.drawLine(0, 0, display.width()-1, i, BLACK);
   display.display();
 }
 delay(250);
 
 display.clearDisplay();
 for (int16_t i=0; i<display.width(); i+=4) {
   display.drawLine(0, display.height()-1, i, 0, BLACK);
   display.display();
 }
 for (int8_t i=display.height()-1; i>=0; i-=4) {
   display.drawLine(0, display.height()-1, display.width()-1, i, BLACK);
   display.display();
 }
 delay(250);
 
 display.clearDisplay();
 for (int16_t i=display.width()-1; i>=0; i-=4) {
   display.drawLine(display.width()-1, display.height()-1, i, 0, BLACK);
   display.display();
 }
 for (int16_t i=display.height()-1; i>=0; i-=4) {
   display.drawLine(display.width()-1, display.height()-1, 0, i, BLACK);
   display.display();
 }
 delay(250);

 display.clearDisplay();
 for (int16_t i=0; i<display.height(); i+=4) {
   display.drawLine(display.width()-1, 0, 0, i, BLACK);
   display.display();
 }
 for (int16_t i=0; i<display.width(); i+=4) {
   display.drawLine(display.width()-1, 0, i, display.height()-1, BLACK);
   display.display();
 }
 delay(250);
}


WaxFlywheel

If I DON'T remove the Robot_Control directory, I get the following when trying to compile:
Code: [Select]
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp: In constructor 'RobotControl::RobotControl()':
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'LCD_CS' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'DC_LCD' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:8: error: 'RST_LCD' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp: In member function 'void RobotControl::begin()':
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXA' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXB' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXC' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:18: error: 'MUXD' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:19: error: 'MUX_IN' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:22: error: 'BUZZ' was not declared in this scope
C:\Program Files\Arduino\libraries\Robot_Control\ArduinoRobot.cpp:25: error: 'Serial1' was not declared in this scope


And if I DO remove it, I get the error in my post above Reply #3 (not pasting it again in order to keep everything a little bit more clean).

If I can do anything else, please let me know!

PaulS

With the Robot_Control library in place, I get this, after downloading the two libraries you linked to.

Quote
C:\Users\pjs9486\Documents\Arduino\libraries\PCD8544\Adafruit_PCD8544.cpp:34: error: conflicting declaration 'uint8_t font []'
C:\Users\pjs9486\Documents\Arduino\libraries\GFX/glcdfont.c:9: error: 'font' has a previous declaration as 'const unsigned char font [1275]'


Comparing the GFX library files in the RobotControl library and the Adafruit GFX library reveals major differences. The examples, at least, in the libraries you linked to have not been updated in ages, apparently.

I think the thing to do is to go to Adafruit's forum and ask that the examples be updated.
The art of getting good answers lies in asking good questions.

lukebayes

I'm also getting these errors, but it happens when I build using the http://inotool.org.

Code: [Select]
ino build -m micro

It only started happening after I added a dependency on Wire.h to my sketch.

I was able to get progress by moving the Robot_Control library out of this location, but this really doesn't feel like the right thing to do.

Should I create a bug in the issues system for this problem?

judholliday

@WaxFlyWheel
The errors you are seeing indicate that the Adafruit_GFX library is not properly installed. I was getting the exact same errors with some other Adafruit example code.

Go to your Arduino libraries folder and check to see that there is a folder there named Adafruit_GFX with the files from github in it.
https://github.com/adafruit/Adafruit-GFX-Library.git
If you didn't change the folder name after downloading or cloning from github it likely isn't named correctly and won't load.

The pcdtest example compiles for me under Arduino 1.0.5 after doing that (and also removing those Robot_Control libraries as mentioned above).

-Jud

oz1bxm

#10
Oct 11, 2013, 09:54 am Last Edit: Oct 11, 2013, 09:56 am by oz1bxm Reason: 1
Computer: PC running Win 7 (32 bit)
IDE: Arduino ver. 1.0.5
HW: Arduino Uno R3
Shield: Adafruit 1.8" TFT with joystick and microSD, ver. 1.0 (item #802 )

I had the same problem as described in the first post by Abubakar022.

I can confirm, that the solution described by Jud works just fine:

1) Delete the folder "Robot_Control" from Program Files\Arduino\libraries\

2) Make sure, that the two Adafruit folders in the same folder are named Adafruit_GFX and Adafruit_ST7735. I had them named "AdafruitGFX" and "AdafruitST7735", but that was wrong.

Regards from Lars Petersen, Denmark

leonardsla3

Hi guys, I am having the exact same problem as the first post. Everything working beautifully until I got  a new laptop and had to upgrade to 1.05.

Where do i find the folder with Robot control in it. Or how do I delete it. I have looked everywhere.

I am using windows 7
Arduino Uno
1.05

PaulS

Quote
Where do i find the folder with Robot control in it.

The error message(s) tell you precisely where. Feel free to actually read them.
The art of getting good answers lies in asking good questions.

aerouta

Well, I am having the same issues... here are the errors that I get.
Code: [Select]

ArduinoRobot.cpp : : In constructor 'RobotControl::RobotControl()':
ArduinoRobot.cpp : 'LCD_CS' was not declared in this scope
ArduinoRobot.cpp : 'DC_LCD' was not declared in this scope
ArduinoRobot.cpp : 'RST_LCD' was not declared in this scope
ArduinoRobot.cpp : : In member function 'void RobotControl::begin()':
ArduinoRobot.cpp : 'MUXA' was not declared in this scope
ArduinoRobot.cpp : 'MUXB' was not declared in this scope
ArduinoRobot.cpp : 'MUXC' was not declared in this scope
ArduinoRobot.cpp : 'MUXD' was not declared in this scope
ArduinoRobot.cpp : 'MUX_IN' was not declared in this scope
ArduinoRobot.cpp : 'BUZZ' was not declared in this scope
keyboard.cpp : : In member function 'int8_t RobotControl::keyboardRead()':
keyboard.cpp : 'KEY' was not declared in this scope
Melody.cpp : 'SQUAWK_PWM_PIN5' was not declared in this scope
Melody.cpp : : In function 'void __vector_17()':
Melody.cpp : 'SQUAWK_PWM_PIN5' was not declared in this scope
Sensors.cpp : : In member function 'void RobotControl::analogWrite(uint8_t, uint8_t)':
Sensors.cpp : 'TKD4' was not declared in this scope
Sensors.cpp : : In member function 'uint8_t RobotControl::_getTypeCode(uint8_t)':
Sensors.cpp : 'TKD0' was not declared in this scope
Sensors.cpp : 'TKD1' was not declared in this scope
Sensors.cpp : 'TKD2' was not declared in this scope
Sensors.cpp : 'TKD3' was not declared in this scope
Sensors.cpp : 'TKD4' was not declared in this scope
Sensors.cpp : 'TKD5' was not declared in this scope
Sensors.cpp : : In member function 'uint8_t RobotControl::_topDPortToAPort(uint8_t)':
Sensors.cpp : 'TKD0' was not declared in this scope
Sensors.cpp : 'TKD1' was not declared in this scope
Sensors.cpp : 'TKD2' was not declared in this scope
Sensors.cpp : 'TKD3' was not declared in this scope
Sensors.cpp : 'TKD4' was not declared in this scope
Sensors.cpp : 'TKD5' was not declared in this scope
Sensors.cpp : : In member function 'int RobotControl::knobRead()':
Sensors.cpp : 'POT' was not declared in this scope
Error compiling


If I uninstall 1.0.5 and install 1.0.3 It compiles just fine. Is it worth upgrading to 1.0.5?? I am not sure what the differences are.

I solved this issue by deleting both the Robot_Control and Robot_Motor libraries

sambaker

I didn't get this compile error until I started using the Sublime Text arduino plugin but it was stopping me from compiling and uploading my code from Sublime on Mac.

The solution that worked for me was to upgrade the Mac Arduino app from 1.0.5 to the 1.5.4 beta. After configuring Sublime to use that version, the plugin compiled everything correctly.

Go Up