needed urgent help

I need to do a system using arduino such that depending on the value of my temperature sensor it should on a fan and depending on the ldr value it shld on light,so I need a program such that these both task can run in single aurdino board.and how to program aurdino such that 2 task can be done simultaneously without interfering.

void setup()
{
//put your setup stuff in here
}

void loop()
{
//do your temperature sensing here
//set state of fan dependent on temperature

//do your light detection here
//set state of lamp relay here

}

Just one point. You'll need to screen your light sensor from the lamp, otherwise when it gets dark it will turn on the lamp, then the illumination it produces will cause it to get light again so the lamp will get turned off, then as it gets dark again, the lamp gets turned back on etc...

Re: needed urgent help

Every one needs help, but you should provide far more information/. Have you read - http://forum.arduino.cc/index.php?topic=261445.0 -

I need to do a system using arduino such that depending on the value of my temperature sensor it should on a fan and depending on the ldr value it shld on light

What have you programmed so far? please post What kind of sensors are you using? please post datasheets (or links to them) How do you connect the FAN? What voltage does it use? please post your schematics

Have you read - http://forum.arduino.cc/index.php?topic=261445.0 -

o I need a program such that these both task can run in single aurdino board.and how to program aurdino such that 2 task can be done simultaneously without interfering.

Have you read - http://forum.arduino.cc/index.php?topic=223286.0 -

ajay457: http://www.engineersgarage.com/electronic-components/lm35-sensor-datasheet

and am using simple ldr.objective is I need program such that when temperature is more than 35° C the put that am giving to fan must be high and wen value of ldr is high (wen dark resistance is high) I need the out put given to light to be high. presently its just prototype so am using DC 12 v motor n led. am sorry am new to this and programing is difficult for me.plz guide me,if u could given a program which would satisfy abv condition DAT would be really great of u.thank you

Are you texting your girlfriend or trying to ask programmers for help?

How does the Digital Audio Tape fit into this?

What have you tried so far? This is a dirt simple program to write. $150 American and I'll send it to you all buttoned up and ready to go. If you want to try yourself then I'll help you for free. But you gotta show at least enough respect to spell the words out and use some punctuation so I can actually read your question and make some sort of sense of it.

but the problem is how to make them work at same time

Where are these mysterious "them" ?

"Them" refers to lm35 sensor(temperature sensor) and ldr(light dependent resistor).

And where is the code that you have at the moment?

ajay457: "Them" refers to lm35 sensor(temperature sensor) and ldr(light dependent resistor).

Have you studied the links in Reply #2 ?

...R