Analo Read

Can anyone help to provide source code for following case.
I need to take digital output for analog input which varies 360 t0 1015 using If condition. The digital out put must available only during value increment from 360 to 1015 not during decrement...

Do you mean that if an analogue input is increasing in the range 360 to 1015 a digital output should be set HIGH ?

The digital out put must available only during value increment from 360 to 1015 not during decrement...

The digital pin's available is "ALL THE TIME". It might be HIGH some of the time, and LOW at other times, but the pin is ALWAYS available.

YOU have to decide if the values being read from the analog pin are in range, and, if they are, whether they are increasing or decreasing. Then, you can turn the output pin on, or off, at the appropriate times.

hatmadushantha:
Can anyone help to provide source code for following case.
I need to take digital output for analog input which varies 360 t0 1015 using If condition. The digital out put must available only during value increment from 360 to 1015 not during decrement…

Do you mean something like

if (current_value != previous_value)
  digitalWrite (pin, current_value < previous_value) ;

ie you are only interested in changing the output if the direction of change of the analog pin changes?