Hi, I have an arduino promicro from sparkfun that I am trying to use as a controller for navigation lights on my r/c airplane. I have two leds that I want to fade on and off, and want to flash the other two leds every second and a half. I want it to be a continuous loop, and have no preference if the light pairs are synchronized or not.
I have gotten the code working to blink the leds in the way I want (attached). I have also gotten the fading lights to work the way I want (using the Fade tutorial), but cannot figure out how to run them together.
Any help is welcome and appreciated! I am very new at this
Airplane Lighting blink.ino (920 Bytes)
Sorry, that file is corrupted, I cannot open it with 2 versions of Arduino IDE. Maybe just post your code here instead, using code tags (the </> button)
You are wanting to do two things at the same time - leds fade and leds blink. Try this Demonstration code for several things at the same time - Project Guidance - Arduino Forum thread.
You can't use for this kind of sketches (as like dannable you need to do several things at the same time) de function delay(). You need to look (and adapt for you sketch) to the example Blink Without Delay.
Look in my code repository (linked below) for a sketch called MultiBlink. One of the patterns already programmed in is for aircraft lights - I did this for someone some time ago.
Multiblink allows you to create patterns by specifying the data of the pattern rather than having to write the code.