'class SevenSegmentTM1637' has no member named 'printTime'

Hi, I’m having problems understanding this error message. Perhaps I’m missing out on something really obvious or maybe it’s just a problem out of this world.
Either way I need some fresh eyes helping me out with this. It all worked fine with an example project making the display shows some random digits, but then I included a second library to make my own changes to the code, here is where it went wrong.

I’ve created a folder called MyLibs in my Arduino folder, here I have included those libraries I want to use. In my .ino I’ve #included these libraries both my writing it and by the options in the tools menu. No matter what I try i get the same error, it cannot find the member printTime in my class…

The error message is the following :

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\name\OneDrive\Dokument\Arduino\klocka\klocka.ino: In function 'void loop()':

klocka:31: error: 'class SevenSegmentTM1637' has no member named 'printTime'

       display.printTime(hours, minutes, true);

               ^

exit status 1
'class SevenSegmentTM1637' has no member named 'printTime'

Any suggestions??

.ino file

#include "SevenSegmentTM1637.h"
#include "SevenSegmentExtended.h"

/* initialize global TM1637 Display object
   The constructor takes two arguments, the number of the clock pin and the digital output pin:
  SevenSegmentTM1637(byte pinCLK, byte pinDIO); */

const byte PIN_CLK = 4;   // define CLK pin (any digital pin)
const byte PIN_DIO = 5;   // define DIO pin (any digital pin)

SevenSegmentTM1637    display(PIN_CLK, PIN_DIO);

uint8_t ms = 100;
uint8_t minut = ms * 60;

void setup() {
  Serial.begin(9600);         // initializes the Serial connection @ 9600 baud
  display.begin();            // initializes the display
  display.setBacklight(100);  // set the brightness to 100 %
  display.print("HAJ");       // display INIT on the display
  delay(1000);                // wait 1000 ms
}

void loop() {
  //initialize hours
  uint8_t hours = 0;
  uint8_t minutes = 0;

  for (; hours < 24; hours++) {     //loop the hours
    for (; minutes < 60; minutes++) { //loop the minutes
      display.printTime(hours, minutes, true);
      delay(minut);
    }
    minutes = 0;  //reset minutes after an hour
  };

}

The error is in the void loop() at the line where I call the function printTime().

Addtitional header file

#include "SevenSegmentTM1637.h"
#include "SevenSegmentExtended.h"

SevenSegmentExtended::SevenSegmentExtended(uint8_t pinClk, uint8_t pinDIO) :
  SevenSegmentTM1637(pinClk, pinDIO)
{ };

void SevenSegmentExtended::printTime(uint16_t t, bool blink) {
  uint16_t max = 2359;
  t = ( t > max) ? max : t;

  uint8_t hour = t / 100;
  t -= (hour * 100);
  uint8_t min  = t;
  printTime(hour, min, blink);
};

void SevenSegmentExtended::printTime(uint8_t hour, uint8_t min, bool blink) {

  bool colonWasOn = getColonOn();
  setColonOn(true);

  uint8_t buffer[4];

  buffer[0] = encode(int16_t(hour / 10));
  buffer[1] = encode(int16_t(hour % 10));
  buffer[2] = encode(int16_t(min / 10));
  buffer[3] = encode(int16_t(min % 10));

  printRaw(buffer, 4, 0);

  // turn colon off and on again
  if (blink) {
    delay(TM1637_DEFAULT_BLINK_DELAY);
    setColonOn(false);
    printRaw(buffer[1], 1);
    delay(TM1637_DEFAULT_BLINK_DELAY);
    setColonOn(true);
    printRaw(buffer[1], 1);
  }

  setColonOn(colonWasOn);

};

header file for the sevensegment, a bunch of declarations etc.

#include "SevenSegmentTM1637.h"
#include "SevenSegmentExtended.h"

// store an ASCII Map in PROGMEM (Flash memory)
const PROGMEM uint8_t asciiMap[96] = {
  TM1637_CHAR_SPACE,
  TM1637_CHAR_EXC,
  TM1637_CHAR_D_QUOTE,
  TM1637_CHAR_POUND,
  TM1637_CHAR_DOLLAR,
  TM1637_CHAR_PERC,

  etcetcetcetc...

SevenSegmentExtended.cpp (2.17 KB)

SevenSegmentExtended.h (1.31 KB)

SevenSegmentTM1637.cpp (12.4 KB)

SevenSegmentTM1637.h (19.3 KB)

klocka.ino (1.09 KB)

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here using code tags.

mixzter:
I've created a folder called MyLibs in my Arduino folder, here I have included those libraries I want to use. In my .ino I've #included these libraries both my writing it and by the options in the tools menu.

I'm not very clear on what that means but it sounds problematic. If I understand correctly you have not done a standard installation of the SevenSegmentTM1637 library. Why not? Please provide more details of what you did.

mixzter:
you mean I missed a step there?

I don't know because it's not clear to me what you did. Typically one of three methods is used to install Arduino libraries. You can find a description of each here:

Change line 12 of your sketch from:

SevenSegmentTM1637    display(PIN_CLK, PIN_DIO);

to:

SevenSegmentExtended    display(PIN_CLK, PIN_DIO);