Problem with LedControl library

trying to work with a dot matrix and every time i try to upload the sketch it comes up with this.

The file is installed and its updated and I've tried both the 1.0 ide and the 2.0 ide

I am using a /keystone plus board that is classed as an uno

Not really sure what to do, not encountered this problem before

thank you, Firstdanjosh.

Wconstants is ancient history.

Where did you find that code?

Please post code and error messages, not pictures

Images of code are nearly worhless. Read the forum guidelines to see how to properly post code and some information on how to get the most from this forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

The Wconstants.h is from an ancient version of the IDE. That file was replaced by Arduino.h. You can try just replacing Wconstnts.h with Arduino.h and see if the code will compile and work.

Please do not post pictures of code or error messages. Copy the text from the IDE and paste it here in code tags

As to your problem, the library that you are using is out of date. Arduino no longer uses WConstants.h. Start by updating the library

#include<LedControl.h>

const int numDisplays = 1;

LedControl ledController (10, 8, 8, numDisplays);

void setup()
{
  Serial.begin(9600);
  ledController.shutdown(0, false);
  ledController.setIntensity(0, 1);
  ledController.setLed(0, 1, 1, 0);
}

void loop(){}

Where did you find that ancient version of the LedControl library?

Install the latest version of the LedControl library using the IDE library manager.

Hello,
sorry for the inconvenience of posting an image of my code.

I found this library from a link in the description of a youtube video that was making a mini game console with an ardiuino and thought i could give it a go myself.

Unfortunately i am not at my pc so i cant send the text of my code.

I will atempt to update it when I can.

Looks like you'll have to update the library yourself (see issue #10).

The fix is to replace line 30 in LedControl.h ...

#include <avr/pgmspace.h>

with ...

#if defined(__AVR__)
#include <avr/pgmspace.h>
#else
#include <pgmspace.h>
#endif

I have updated the library as said in the library manager but it still comes up with the same error, i am not sure where to go to change the library itself

You should be able to find the LedControl.h file in the LedControl folder in the libraries folder in your sketchbook. Did you look there?

Which version of the library do you have installed now ?

I have version 2.0.1

Ill have another look when i can but i dont know where the sketches file is located

In IDE 1.8.13, which I am using, Library Manager does not show a version number for the LedControl library. It does however show that there is a version 2.0.1 of the LedController library

Are you sure that you are looking at and using the correct library ?

In the IDE go to the File menu then Preferences. At the very top will be shown the path to your sketchbook.

From post #1, the path to LedControl.h is:

Ahh ok, thank you

I completely forgot about that :upside_down_face:

Must have spelt it wrong in the title but ill look in the manager again

Your code is using the LedControl library

LedControl ledController (10, 8, 8, numDisplays);

but I suspect that you are updating the LedController library

As an experiment try this with your board and normal method of compiling and uploading

void setup()
{
  Serial.begin(115200);
  Serial.println(ARDUINO);
}

void loop()
{
}

What is printed in the Serial monitor ?