issues with a prodject

What you have is code that runs in under a millisecond interspersed with full-second delays where nothing is sensed or acted upon, these delays eat over 99% of the time the code runs.

The difference between

code that waits for something by allowing nothing else to run while waiting

and

code that waits for something by checking on the time every so often, allowing everything else to run

is code that can do one thing at a time and code that can do 100's of things at a time.

You can learn the tricks/tools/techniques here, it's like the forum specialty, and then you can make code that flies.