X does not name a type, Library

I don't know what's wrong. I'm sorry, I'm new at this and I don't know what I did wrong.

sketch_aug19a.ino (341 Bytes)

ShiftSeven.h (983 Bytes)

ShiftSeven.cpp (4.53 KB)

You need to put the library files in a directory called 'ShiftSeven' inside the libraries directory,
and then restart the IDE.

It's still says that.

I have the in the libraries folder.

You need to move these three lines into the 'setup()' function:-

shi.control (8, 38);
shi.input(2, 3, 4, 5, 6, 7);
shi.latch(44, 45, 46, 47, 48, 49);

This compiles fine:-

#include <ShiftSeven.h>

ShiftSeven shi;

void setup()
{
    shi.control (8, 38);
    shi.input(2, 3, 4, 5, 6, 7);
    shi.latch(44, 45, 46, 47, 48, 49);

    shi.display(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}

void loop()
{
    for (int j = 0; j < 10; j++)
    {
        shi.display(j, 0, j, 0, j, 0, j, 0, j, 0, j, 0);
        delay(1000);
        shi.display(j, 1, j, 1, j, 1, j, 1, j, 1, j, 1);
        delay(1000);
    }
}

And for future reference, rather than attaching your code and screenshots of the errors, please put them in your post, inside [code]code tags[/code].
You can manually type them as above, or paste the code/error into your post, select it then hit the </> button.

Thanks a lot for the help! It's working now :slight_smile: And also thank you for the tips. I'll remember them next time! :smiley: