Error Message using Adafruit LEDBackpack example

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
cflowers
 
Posts: 1
Joined: Sat Jul 19, 2014 2:48 pm

Error Message using Adafruit LEDBackpack example

Post by cflowers »

I'm using one of the LED backpacks for a timer, and I'm trying to compile to make sure everything is working, and I'm getting an error message that I have no capability for understanding, so I have no clue how to fix it.
Code.

Code: Select all

// Enable one of these two #includes and comment out the other.
// Conditional #include doesn't work due to Arduino IDE shenanigans.
#include <Wire.h> // Enable this line if using Arduino Uno, Mega, etc.
//#include <TinyWireM.h> // Enable this line if using Adafruit Trinket, Gemma, etc.

#include <Adafruit_LEDBackpack.h>
#include <Adafruit_GFX.h>

Adafruit_7segment matrix = Adafruit_7segment();

void setup() {
#ifndef __AVR_ATtiny85__
  Serial.begin(9600);
  Serial.println("7 Segment Backpack Test");
#endif
  matrix.begin(0x70);
}

void loop() {
  // try to print a number thats too long
  matrix.print(10000, DEC);
  matrix.writeDisplay();
  delay(500);

  // print a hex number
  matrix.print(0xBEEF, HEX);
  matrix.writeDisplay();
  delay(500);

  // print a floating point 
  matrix.print(12.34);
  matrix.writeDisplay();
  delay(500);
  
  // print with print/println
  for (uint16_t counter = 0; counter < 9999; counter++) {
    matrix.println(counter);
    matrix.writeDisplay();
    delay(10);
  }

  // method #2 - draw each digit
  uint16_t blinkcounter = 0;
  boolean drawDots = false;
  for (uint16_t counter = 0; counter < 9999; counter ++) {
    matrix.writeDigitNum(0, (counter / 1000), drawDots);
    matrix.writeDigitNum(1, (counter / 100) % 10, drawDots);
    matrix.drawColon(drawDots);
    matrix.writeDigitNum(3, (counter / 10) % 10, drawDots);
    matrix.writeDigitNum(4, counter % 10, drawDots);
   
    blinkcounter+=50;
    if (blinkcounter < 500) {
      drawDots = false;
    } else if (blinkcounter < 1000) {
      drawDots = true;
    } else {
      blinkcounter = 0;
    }
    matrix.writeDisplay();
    delay(10);
  }
}
Error.


C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Adafruit_LEDBackpack\Adafruit_LEDBackpack.cpp: In constructor 'Adafruit_8x8matrix::Adafruit_8x8matrix()':
C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Adafruit_LEDBackpack\Adafruit_LEDBackpack.cpp:298: error: no matching function for call to 'Adafruit_GFX::Adafruit_GFX(int, int)'
C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Robot_Control/Adafruit_GFX.h:41: note: candidates are: Adafruit_GFX::Adafruit_GFX(const Adafruit_GFX&)
C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Robot_Control/Adafruit_GFX.h:41: note: Adafruit_GFX::Adafruit_GFX()
C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Adafruit_LEDBackpack\Adafruit_LEDBackpack.cpp: In constructor 'Adafruit_BicolorMatrix::Adafruit_BicolorMatrix()':
C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Adafruit_LEDBackpack\Adafruit_LEDBackpack.cpp:335: error: no matching function for call to 'Adafruit_GFX::Adafruit_GFX(int, int)'
C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Robot_Control/Adafruit_GFX.h:41: note: candidates are: Adafruit_GFX::Adafruit_GFX(const Adafruit_GFX&)
C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Robot_Control/Adafruit_GFX.h:41: note: Adafruit_GFX::Adafruit_GFX()

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Error Message using Adafruit LEDBackpack example

Post by adafruit_support_bill »

C:\Users\Caroline\Desktop\arduino-1.0.5-r2-windows\arduino-1.0.5-r2\libraries\Robot_Control/Adafruit_GFX.h:41: note: candidates are: Adafruit_GFX::Adafruit_GFX(const Adafruit_GFX&)
You have stumbled across the "Robot Control" bug in Arduino 1.0.5. That version of the Arduino IDE uses an older version of our GFX library for the Arduino Robot display. That causes problems for anyone trying to use the current version of GFX.

Either of the following two workarounds will fix that:
1)Use 1.0.4 - it does not have this problem.
2) Delete the RobotControl folder from your arduino-1.0.5-r2\libraries folder.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”