Help understanding what is wrong

So my boss wants me to get an Arduino board up and running and doesnt know anything about it because the guy who made it and wrote the code didnt leave any documentation. I am currently trying to get a test script for testing the motor running but I keep running into this error. Can someone please explain to me what is the issue.

The motor worked for a little bit when I started the upload but then this message came back. I dont know why my folder is invalid and what header file I would need.

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x4a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x4a
Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a-test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a-test
Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a-test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a-test

This is my code
void setup() {
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
}

void loop() {
digitalWrite(8,LOW);
for (int i=0;i<1800;i++)
{
digitalWrite (9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}

digitalWrite(8,HIGH);
for (int i=0; i<1800; i++)
{
digitalWrite(9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}
}

Which board?

A mega 2560.

...and there's your answer

Could you possibly elaborate?

You already elaborated yourself, up there ^^^

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

Oh im so sorry, I saw that error before posting and changed it but I guess I forgot to change it in the post. I am still having the header file missing issue and that is what I am not understanding. Sorry about the confusion.

Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test

Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test

Post your code, and all your error message(s) in code tags.

void setup() {
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
}

void loop() {
digitalWrite(8,LOW);
for (int i=0;i<1800;i++)
{
digitalWrite (9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}

digitalWrite(8,HIGH);
for (int i=0; i<1800; i++)
{
digitalWrite(9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}
}
Sketch uses 1544 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test
Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test
Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test

The code compiles - what's the problem?

When I upload it spends one second and then ends the upload followed by the bit about the invalid library and doesnt actually move my motor. I guess I am trying to figure out why the library is invalid and what kind of header file it wants.

Your code, as posted, doesn't use any libraries, so that's a red-herring.

Add some debug prints, then report back.

Ok, I will need to spend a little time figuring out how to do that. Sorry for being a noob, never used arduino before today.

So i put in #define DEBUG 1 at the top and

#ifdef DEBUG
Serial.begin(9600);
#endif

in the setup() and nothing changed.

Is this the debugging code you where referring to?

Did you put in any debug prints?
Did you remember to open the serial monitor?

I dont know where to put the debug prints and I dont really know what you mean by open the serial monitor.

This is what I have

#define DEBUG 1
void setup()
#ifdef DEBUG
Serial.begin(9600);
#endif
{
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
}

void loop() {
digitalWrite(8,LOW);
for (int i=0;i<1800;i++)
{
digitalWrite (9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}

digitalWrite(8,HIGH);
for (int i=0; i<1800; i++)
{
digitalWrite(9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}
}

and I got a new error message the 2nd time I ran it

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

sketch_dec13a_test:4:1: error: expected initializer before 'Serial'

 Serial.begin(9600);

 ^

sketch_dec13a_test:6:1: error: expected unqualified-id before '{' token

 {

 ^

exit status 1
expected initializer before 'Serial'

Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test
Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
void setup()
{
#ifdef DEBUG
Serial.begin(9600);
#endif

I still don't see any prints.

#define DEBUG 1
void setup()
#ifdef DEBUG
Serial.begin(9600);
Serial.print()
#endif
{
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
}

void loop() {
digitalWrite(8,LOW);
for (int i=0;i<1800;i++)
{
digitalWrite (9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}

digitalWrite(8,HIGH);
for (int i=0; i<1800; i++)
{
digitalWrite(9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}
}

????? I honestly dont know what I am doing at this point. Sorry I cant be more helpful. Do I need to put between the print ()?

Did you see reply #16?

#define DEBUG 1
void setup()
{
#ifdef DEBUG
Serial.begin(9600);
#endif  
Serial.print(DEBUG)
;
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
digitalWrite(8,LOW);
digitalWrite(9,LOW);
}

void loop() {
digitalWrite(8,LOW);
for (int i=0;i<1800;i++)
{
digitalWrite (9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}

digitalWrite(8,HIGH);
for (int i=0; i<1800; i++)
{
digitalWrite(9,HIGH);
delay(10);
digitalWrite(9,LOW);
delay(10);
}
}

Is this what you mean? Still only comes back with

Sketch uses 2872 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 184 bytes (2%) of dynamic memory, leaving 8008 bytes for local variables. Maximum is 8192 bytes.
Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test
Invalid library found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test: no headers files (.h) found in C:\Users\jwt13\Documents\Arduino\libraries\sketch_dec13a_test