Instructables

PWM control and "off" for arduino IR remote?

I've built a simple IR remote to trigger a led bar using...

http://www.instructables.com/id/Control-your-Arduino-with-a-remote/step5/Control-stuff/

As my template. 

All the leds turn on a-okay but I'd like to be able to implement both an "off" function using the same button 

ie. button1=High      

leave on for desired period of time...

button1=Low


I'd like to be able to use a no delay fade in/out as well...

ie. button7= All leds fade in/out until button7=low (using the method above^^)

I've tried plugging in various other parts of code to no avail...

Any help would be greatly appreciated!!!

Thanks!

mpilchfamily10 months ago
What code are you using and what changes have you made?
vtrguy (author)  mpilchfamily10 months ago
I've just discovered that using the code with the ON/OFF, if I get a repeat code..
4294967295

It will freeze and not accept any more transmissions. Is there anyway to get rid of that as well?
vtrguy (author)  mpilchfamily10 months ago
void loop() {
if ((irrecv.decode(&results)) && (results.value==16753245) ) {
if (state == 0) {
state = 1;
digitalWrite(LED, HIGH);
Serial.println("Center - HIGH");
} else {
state = 0;
digitalWrite(LED, LOW);
Serial.println("Center - LOW");
}
delay(50);
irrecv.resume();


I found this and I've gotten the on/off working, but am still having troubles with adding the fade
vtrguy (author) 10 months ago
As well, I'm fairly new at this so please forgive me!