Basic Arduino Questions

Have a look at how the program is organized in Planning and Implementing a Program. It will be much easier to develop, test and debug a program if it is designed as a collection of small single purpose functions. (Don't worry if you don't understand all the details of the program straight off).

If you put all the code for a complex program into the loop() function it can very quickly become a mess of spaghetti.

...R