Greg_Brown
(Greg Brown)
September 21, 2018, 7:38am
1
Hey guys. For Arduino, does anyone know of some code for runway approach lights? Like a series of streaks pointing the way down the strip. I’ve seen some examples for other devices, but because im still pretty new to this unable to modify for arduino. Thanks!
marmil
(Marc Miller)
September 21, 2018, 2:10pm
2
Some ideas for you try out. Maybe something will give you some ideas of how to code what you’re looking for.
//***************************************************************
// Patterns of Blinking!
// Each pixel repeats a certain color pattern. Each pixel's
// pattern can be different in both colors and length.
// All patterns blink at the same rate.
//
// This example was inspired by Mike Thornbury's forum post:
// https://plus.google.com/101708620681849403392/posts/J1HPyNBj7ET
//
// Initially there is a bit of manual setup needed to add the
// patterns and fill some things into the arrays. There is
// probably fancier (less manual) ways to do this, but this
// works for now!
//
// Marc Miller, April 2018
//***************************************************************
#include "FastLED.h"
#define DATA_PIN 11
This file has been truncated. show original
//***************************************************************
// Moving colored bars
// Original code by Richard Bailey, Feb. 2017
//
// Modified to allow a few other options (which might be
// useful for Christmas!)
// You'll probably need to adjust stuff for longer strips. I only
// tested with a tiny 32 pixel setup.
//
// Marc Miller, Dec 2017
//***************************************************************
#include "FastLED.h"
#define DATA_PIN 11
#define CLK_PIN 13
#define LED_TYPE LPD8806
#define COLOR_ORDER GRB
#define NUM_LEDS 32
#define BRIGHTNESS 64
CRGBArray<NUM_LEDS> leds;
This file has been truncated. show original
//***************************************************************
// Marquee fun (v3)
// Pixel position down the strip comes from this formula:
// pos = spacing * (i-1) + spacing
// i starts at 0 and is incremented by +1 up to NUM_LEDS/spacing.
//
// Marc Miller, May 2016
// Updated June 2018 - reordered some stuff and small bug fix.
//***************************************************************
#include "FastLED.h"
#define LED_TYPE LPD8806
#define NUM_LEDS 32
#define COLOR_ORDER GRB
//#define LED_TYPE APA102
//#define NUM_LEDS 39
//#define COLOR_ORDER BGR
#define DATA_PIN 11
This file has been truncated. show original
//***************************************************************
// Basic example that repeats colored blocks of random size down
// the strip. The block size is changed every several seconds.
//
// Important to note is there is a check to make sure we don't
// try to write data to pixels that don't exist (ie. values
// equal or greater then NUM_LEDS). Trying to write pixel
// data to pixels that don't exist the causes bad things to
// happen in memory.
//
// Marc Miller, July 2017
// May 2020 - replaced delays with EVERY_N
//***************************************************************
#include "FastLED.h"
#define DATA_PIN 11
#define CLOCK_PIN 13
#define LED_TYPE LPD8806
#define COLOR_ORDER GRB
This file has been truncated. show original
FastLED example code, tests, demos, etc. Contribute to marmilicious/FastLED_examples development by creating an account on GitHub.
marmil
(Marc Miller)
September 21, 2018, 6:28pm
3
@Greg_Brown if you can share a video of what you’re looking for that might help others help with ideas too.
Ken_White
(Ken White)
September 22, 2018, 7:42pm
4
@Greg_Brown - This chase sketch might be what you are looking for. See:
https://plus.google.com/102004717133653297761/posts/biLArRfcf3w
It is used in this flagpole project:
https://plus.google.com/102004717133653297761/posts/ejo7GikdCft
and two different chase animations can be seen in the flagpole video starting at 2:08.
Greg_Brown
(Greg Brown)
September 23, 2018, 12:48pm
5
Greg_Brown
(Greg Brown)
September 28, 2018, 3:08am
6
Hey @Ken_White , if it’s not too much to ask, i have a question about using your github site code. i see you have a .ino file (CD77_Chase_Demo) and two other .h files (Chase and Time_Performance). How do i include these files? i tried copying the .h files into my FastLed libraries folder, but after compiling it said “chase.h no such file or directory”. I feel like this is really basic and i just don’t understand the structure, but finding references isn’t as easy as i thought. Any advice is appreciated, thank you.
marmil
(Marc Miller)
September 28, 2018, 3:32am
7
The .h files are included on line 25 and 26 in the .ino file. Just put them in the same location as the .ino file.
Ken_White
(Ken White)
September 28, 2018, 11:50am
8
@Greg_Brown - @marmil is correct. Copy the .h files of this sketch to the same folder that the .ino file is located.
Greg_Brown
(Greg Brown)
September 29, 2018, 6:12pm
9
Thanks @Ken_White and @marmil got it! Turns out i just don’t know how to use Github – I needed to download the master (which already had the files in the right place). Thanks for the code I’ll be sure to show you my project when i’m done.