Go Down

Topic: time alarm example (Read 19 times) previous topic - next topic

pat

Hi
Arduino mega
Nixon enhanced touchscreen
ds1307

time alarm example
I have been trying to turn on turn off and LED light to no luck.
Look on Internet and your forum I still can't figure out what I am doing wrong.
pinMode(led,OUTPUT,); LED light lights up but stays lit.
My goal is to turn on light at 5 PM turn off light at 5 in the afternoon daily. And have one weekly event and one monthly event.
The daily event is to control dht22 sensor but I need the sensor to turn on and off the light according to humidity and temperature.
So do I need and IF statement and how.
As usual thanks for all your help and advice
Paul.

spycatcher2k

Quote
Serial.println("turn on at 9:00 pinMode led,HIGH;");
Code: [Select]
Serial.println("turn on at 9:00");
digitalWrite( led,HIGH);
-=-
http://www.uk-pcb.co.uk - UK Based PCB Fab & Assembly Company
Design & Assembly work undertaken - Arduino repairs & testing - PM for details. Arduino & C# PC programming.

spycatcher2k

Do the basic examples BEFORE going any further . . Activating pins is a basic of using the Arduino.
-=-
http://www.uk-pcb.co.uk - UK Based PCB Fab & Assembly Company
Design & Assembly work undertaken - Arduino repairs & testing - PM for details. Arduino & C# PC programming.

pat

Code: [Select]
Serial.println("turn on at 9:00");
digitalWrite( led,HIGH);

thanks

Go Up