Problema librerie

Ho avuto la necessità di creare librerie per ogni componente che utilizzo nel processo, quindi ho creato la libreria che gestisce l'lcd, ho un errore di compilazione che non riesco a risolvere.
File principale:

#include "LcdLib.h"
#include <SerialCommand.h>
#include <SoftwareSerial.h>
#include <LedDisplay.h>  
SerialCommand SCmd;
uint8_t LCD_DATA_PIN = 6;              
uint8_t LCD_REGISTER_SELECT = 7;      
uint8_t LCD_CLOCK_PIN = 8;             
uint8_t LCD_ENABLE = 9;               
uint8_t LCD_RESET = 10; 
int LCD_BRIGHTNESS = 15;
Lcd lcd( LCD_DATA_PIN, LCD_REGISTER_SELECT, LCD_CLOCK_PIN,
               LCD_ENABLE, LCD_RESET, LCD_BRIGHTNESS );               
void setup() {
  Serial.begin(9600);
  lcd.begin();
  SCmd.addCommand("CDS",PrintByLcd);
}
void loop() {
  // put your main code here, to run repeatedly:
  SCmd.readSerial();
}
void PrintByLcd(){
  String str = SCmd.next();
  lcd.write( str );
  Serial.println("ok");
}

File.h:

#ifndef LCD_h
#define LCD_h

#include <Arduino.h>
#include <LedDisplay.h>

class Lcd
{
  public:
    Lcd( uint8_t LCD_DATA_PIN, uint8_t LCD_REGISTER_SELECT, uint8_t LCD_CLOCK_PIN, uint8_t LCD_ENABLE, uint8_t LCD_RESET, int LCD_BRIGHTNESS );      

  void begin();  
	void write( String out );
  private:
    uint8_t DATA_PIN, REGISTER_SELECT, CLOCK_PIN, ENABLE, RESET;
    int BRIGHTNESS;
    LedDisplay myDisplay;
};

#endif

file.cpp:

#include "Arduino.h"
#include "LcdLib.h"
#include <LedDisplay.h>
Lcd::Lcd( uint8_t LCD_DATA_PIN, uint8_t LCD_REGISTER_SELECT, uint8_t LCD_CLOCK_PIN, uint8_t LCD_ENABLE, uint8_t LCD_RESET, int LCD_BRIGHTNESS )
{
	this->DATA_PIN = LCD_DATA_PIN;
	this->REGISTER_SELECT = LCD_REGISTER_SELECT;
	this->CLOCK_PIN = LCD_CLOCK_PIN;
	this->ENABLE = LCD_ENABLE;
	this->RESET = LCD_RESET;
	this->BRIGHTNESS = LCD_BRIGHTNESS;
}
void Lcd::begin(){
    myDisplay = LedDisplay(DATA_PIN, REGISTER_SELECT, CLOCK_PIN, ENABLE, RESET, 8);
  	myDisplay.begin();
  	myDisplay.setBrightness(BRIGHTNESS);
}
void Lcd::write( String str ){
  myDisplay.home();
  if( !str ){
    myDisplay.print("        ");
  }else{
    myDisplay.print(str);
  }
}

e l'errore è: "no matching function for call to 'LedDisplay::LedDisplay()' "
Grazie in anticipo

boh?
solo una cosa, l'ultimo parametro non è brightness ma displayLength e comunque è un uint8_t anche lui e non un int :wink:

Lcd::Lcd( uint8_t LCD_DATA_PIN, 
      uint8_t LCD_REGISTER_SELECT, 
      uint8_t LCD_CLOCK_PIN, 
      uint8_t LCD_ENABLE, 
      uint8_t LCD_RESET, 
      int LCD_BRIGHTNESS )
LedDisplay::LedDisplay(uint8_t _dataPin,
					   uint8_t _registerSelect,
					   uint8_t _clockPin,
					   uint8_t _chipEnable,
					   uint8_t _resetPin,
					   uint8_t _displayLength)

Se LedDisplay non ha un costruttore senza parametri, devi richiamarne uno da quello della tua classe. Tu lo fai dal begin(), e lì è troppo tardi.

In alternativa puoi usare un puntatore, quello lo puoi inizializzare quando vuoi, ma non è una soluzione bellissima...

Patrick_M:
boh?
solo una cosa, l'ultimo parametro non è brightness ma displayLength e comunque è un uint8_t anche lui e non un int :wink:

ok in effetti non ci avevo fatto caso, grazie.

SukkoPera:
Se LedDisplay non ha un costruttore senza parametri, devi richiamarne uno da quello della tua classe.

come faccio? :cold_sweat:

Lcd::Lcd( uint8_t LCD_DATA_PIN, uint8_t LCD_REGISTER_SELECT, uint8_t LCD_CLOCK_PIN, uint8_t LCD_ENABLE, uint8_t LCD_RESET, int LCD_BRIGHTNESS ): LedDisplay (...) {

Ma devi avere i parametri da passargli...

SukkoPera:

Lcd::Lcd( uint8_t LCD_DATA_PIN, uint8_t LCD_REGISTER_SELECT, uint8_t LCD_CLOCK_PIN, uint8_t LCD_ENABLE, uint8_t LCD_RESET, int LCD_BRIGHTNESS ): LedDisplay (...) {

Ma devi avere i parametri da passargli...

No, dico l'opzione di creare un puntatore all'oggetto ledDisplay così -> "LedDisplay *myDisplay=NULL;"
però poi come lo uso?
Oppure posso creare un costruttore vuoto proprio nella libreria ledDisplay, che non faccia niente ma almeno metcha e il costruttore "vero" lo chiamo dal begin

LedDisplay *myDisplay;

Per completezza dico che ho risolto facendo tentativi casuali, mettendo nella parte privata

LedDisplay myDisplay = LedDisplay(DATA_PIN, REGISTER_SELECT, CLOCK_PIN, ENABLE, RESET, 8);

risolto così, spero sia concettualmente corretto. Grazie comunque molto gentile

A dire il vero, mi stupisce che compili...

Anche a me, infatti non avevo nemmeno provato ahahahaha