I need Help :- I am working on project of Infrared Remote control for controlling 2 relay Board. I am using TV Tuner Cards remote for Controlling the Relay , I have done all things like Extracting raw code for Remote Controller, coding the ARDUINO UNO , wiring the sensor on breadboard and tested project for working, it's working but the problem is when i shutdown the arduino and restart it's power the two relays goes ON automatically when i press specific key on Remote Controller it's toggles ON / OFF as expected but when reboot or Cold start ';; the relay get ON automatic.. Please tell why this getting happened. Below is the Code i am using .

void loop() { if (irrecv.decode(&results)) { if (results.value == 0x61D648B7) { // Remote Control Power Code // If it's been at least 1/4 second since the last // IR received, toggle the relay if (millis() - last > 250) { on = !on; digitalWrite(relay1, on ? HIGH : LOW); } last = millis(); }

I Need help in another project : i am using LDR and arduino uno and 2 relay module when LDR detects low light it trigger the relay my problem is when slight change in LDR value the relay gets flickering like fast on/ off how to get steady on or steady off ?? the relay module pin is connected to pin 12 on arduino uno... i am using the code below ..

Anyway if you don't post the code correctly next time this is the last help you get from me because you are showing a great discurtsy to the board by ignoring our simple requests.

Quote

my problem is when slight change in LDR value the relay gets flickering like fast on/ off

You will do when the value is around the threshold mark of 600. You can get round this in code by introducing a hysteresis, that is a different threshold for the turn on to the turn off. You need a variable to see what state you are currently in and then compare it with say 600 if it is on or 620 if it is off.

hi i am very sorry for broking the rules but i am new to this forum and i tried to get help from forum help pages but when i first log-in to this forum from that time the help page is not showing and only says " DUDE, WE ARE POPULATING OUR HELP SERVER " and "come back in a minute we will be done, for sure!. " now tell me what can i do ? if any other help page is there please tell me ..