I am attempting to "ramp up" the rate of an led blink and then blink at a constant rate. similar to the fade effect using the PWM function. I am currently using an LedFlasher library as it makes my life much easier in the code. the "busslights" is the led in question.Below is the code.
// Simple Navigation & Strobe light flashing
// Author: Ostrich Longneck
// Date: 1 November 2015
// LedFlasher Library by Nick Gammon, 23 Dec 2012
//Usage:
// LedFlasher ledName (pin, offtime, ontime, initiallyactive); // set parameters
#include <LedFlasher.h>
// set up the LEDs
LedFlasher strobeLights (13, 900, 100);
LedFlasher navLights (12, 500, 1000);
LedFlasher bussLights (12, 50, 50);
void setup()
{
strobeLights.begin ();
navLights.begin ();
bussLights.begin ();
} // end of LED setup
void loop() // The main program
{
// update lights
strobeLights.update ();
navLights.update ();
bussLights.update ();
// Check for Button presses & execute code here ...eventually
} // end of loop
Your question lacks substance. In order to produce an effective post that will get you the help you need, you will need to quantify better what you need help with.
Currently, I think you need to know how to change the flicker rate of the LEDs.
I know how to control the blink rate of the LEDs. What I am attempting to do with 1 of the LEDs is to start at zero and slowly get to a set max. This is difficult to describe. Something like this. I know this code won’t work just giving an idea of what I am trying to do. Analogous to a car going 0-60 while slowly pushing on the gas