Hello, Im having an issue fading an led strip in and out. I need it to fade on, stay on for 2 mins, then fade off and stay off for 2 mins. I tried using the basic single LED program, but that one doesn't work because adding delays blocks the code. I also tried using the JLED library with the breathing effect, but cant get it to stay on and off long enough as it malfunctions each time, causing the led to skip the fading effects. Below is the code I'm using with the max on and off times that I can get it to work with. Is there a simple code I can use to do this? I'm a beginner and also need to have this done quickly. Any help is appreciated.
}`#include <jled.h>
// connect LED to pin 9 (PWM capable). LED will breathe with period of
// Fade on for 5 seconds, Stay on for 30, fade off for 5, stay off for 20
auto led = JLed(9).Breathe(5000, 30000, 5000).DelayAfter(20000).Forever();
#include <jled.h>
// connect LED to pin 13 (PWM capable). LED will breathe with period of
// 2000ms and a delay of 1000ms after each period.
auto led = JLed(9).Breathe(5000, 30000, 5000).DelayAfter(20000).Forever();
void setup() {}
void loop() {
led.Update();
}
You need to use a logic level FET, that is one which will fully turn on with a 5V signal. Those FETs need a 10V signal to turn on, and so are useless for what you want to do with them.