How to determine the value for delay?

I read some Arduino books and sample codes. Often, they put a delay(100) at the end of the loop to delay between sensor readings. Sometimes they use other values behind statement to turn the motor. How do we determine the appropriate value for this parameter?

It's milliseconds.

When in doubt like that, check the reference. Arduino Reference - Arduino Reference

How do we determine the appropriate value for this parameter?

Always zero. :wink:

I know it is in milliseconds. What I don't know is how to determine the number of milliseconds to delay. Each project is different. How do I determine the appropriate value?

The interval (note I didn't write "delay") is usually only there to allow humans to read the results

AWOL:
The interval (note I didn't write "delay") is usually only there to allow humans to read the results

On the other hand, sometimes it isn't. Only YOU know why you have a delay() and how long you want to stick your head in the sand.

Delay is viewed as training wheels on a bike. When delay is called, EVERYTHING stops until the timer is done. The code freezes.

So if you want to send multiple lines to the monitor and have time to read them, you need to have some kind of timer running.

Look at the Blink without Delay example.

newto_arduino:
I know it is in milliseconds. What I don't know is how to determine the number of milliseconds to delay. Each project is different. How do I determine the appropriate value?

I don't understand the question. You delay as long as you want the code to be stuck in delay. If you want to print something to the screen once per second then delay(1000) if you want to delay 2 seconds between turning on and off an led then delay(2000). You decide how long you want to wait, and put that number in milliseconds. What am I missing here?