LedControl ESP8266 error: no matching function

This is the beginning of the code the whole Sketch will be compiled properly with the Arduino IDE but with Platform IO No Problem compiling the Led Control Stuff but When I try to compile this with Platform IO I get the Error

src\main.cpp:24:44: error: no matching function for call to ‘LedControl::LedControl(int, int, int, int)’
LedControl lc=LedControl(DataIn,CLK,LOAD,1);

#include <ShiftRegister74HC595.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include "time.h"
#include <NTPClient.h>
#include <FastLED.h>

#include <Ticker.h>

//We always have to include the library
#include "LedControl.h"

#define DataIn 16
#define CLK 14
#define LOAD 12

void ShowTime(time_t Value);
void hello();
 LedControl lc=LedControl(DataIn,CLK,LOAD,1);

Off the top of my head, have you added the correct LedControl library to lib_deps in platformio.ini? I know it may be a stupid question, but there does appear to be numerous libraries named “LedControl” on PlatformIO Registry so maybe it’s possible you have the wrong one?

This one by Eberhard Fahle, wayoda/LedControl, appears to take the correct 4 parameters that your code is using.

Do you know which one is installed on your Arduino IDE setup?



Thank you for your Asnwer
Sure I have the right Library The Sketch work with the Arduino IDE I just copied the Lib from PlatformIO to the Arduino Folder. But with lib_deps = wayoda/LedControl@^1.0.6 it is working Thank you very much.

1 Like