Profile

Cover photo
Christopher Kirkman
81 followers|224,563 views
AboutPostsPhotosYouTubeReviews

Stream

 
This may be more of a general Arduino programming question, but since I'm applying it directly to a FastLED project, it's just as well asked here. How would I go about creating a function that can run over itself without overwriting itself?

To put it simpler, I want to build a sketch that creates a firework that picks a random color and fires off in opposite directions (with a tail) from a random point. I'm partial to the comet sketch from the OpenLab Neopixel playground. The trick is that I want more than one to fire off at at time, with their own colors and tails.

So, is the best way to do this to create two separate functions and time them to overlap (somehow, cuz I'm at a loss here) or as one functions to fire off every x-second so they overlap but without overwriting the previous set?
1
JP Roy's profile photoJames Edwards's profile photoChristopher Kirkman's profile photo
29 comments
 
After setting it up on my tester, it looks like you hit all the points I set out to do as demonstrated by the javascript demo and what I had initially described. The icing on the cake would be to get the meteor tail effects mentioned above to get it really spiffy, but I didn't put emphasis on it.

After the event last night, I figured I'd run it just to see what it would look like on the roof. I'm not certain why, but it doesn't run on my 300 strip. If I knock it back down to around 120 or something, I see the sequence start, break, then start again over and over.

I don't think it's a power problem because I have another sketch that lights them all without conking out (the color palette sketches). I'll keep hammering on it, not only to learn why/how the overlapping works but to have something ready for The 4th of July.
Add a comment...

Christopher Kirkman

Quasi-related random  - 
 
So, this is sorta related to the group. After a lot of trial and error, I've discovered that having my LEDs on (my Christmas tree and mini-holiday village are lousy with em) actually prevents my garage door from working.

As nutso as it sounds, when the strip is plugged into the Arduino, I can't open my garage door with either of my remotes. The best I can figure from bits and pieces off the net is some sort of RF egress interference. Trouble is, I have no idea how to counter it. Anyone have any suggestions? Or even come across this problem themselves? It's kinda maddening.
1
Peter Hanse's profile photoSteve Animatrix's profile photoChristopher Kirkman's profile photoSean Harris's profile photo
14 comments
 
A couple of years ago I put a cree 60 watt equivalent led bulb in my garage door opener and noticed the same problem whenever the light was on. This Christmas I hung rgb led light strings around the windows and over the garage door and now have to stand right in front of the door for the remote opener to work when the lights are on.
Add a comment...
 
Not mission critical, but I hope someone's reading this cuz I wanna solve it in the next hour. There's a bouncing ball effects over here:

http://www.tweaking4all.com/hardware/arduino/adruino-led-strip-effects/#bouncing_balls_color

that I'm using in a holiday tie (pics later). But because of the way I wired it up, I need to reverse the bounce and I can't for the life of me figure out that math. I want it to effectively bounce down, instead of up as if gravity were reversed and starting at the top of the strip instead of the bottom. Unfortunately, just reversing the gravity variable doesnt do the trick.

Please help! I got a party to look totally tacky at!
1
Dushyant Ahuja's profile photoChristopher Kirkman's profile photo
3 comments
 
+Dushyant Ahuja I thought that at first too, but that wasn't the case. I haven't quite wrapped my head around how the bounce is calculated, but as I posted above, modifying the position setter to just subtract the number from the total number of LEDs worked perfectly.
Add a comment...
 
Opinion time.

I created a wizard staff that lights up with a few patterns for a halloween prop using just 3 ws2812b. Since I ordered another hundred for a project that I only need a few dozen for, I figured I'd soup up the staff. From a programming standpoint, is it easier to apply, say, the Fire sketch to a matrix of sorts where the LEDs are laid out row by row horizontally or column by column vertically.

In case that makes no sense, I've attached an image.
1
Andrew Tuline's profile photoMarc Miller's profile photoChristopher Kirkman's profile photo
3 comments
 
great advice. Thanks gents. I wont be diving into this until after the silly season, but this will help me get started. I plan on 3d printing the core for each LED to fit into to help spacing and such.
Add a comment...

Christopher Kirkman

Show off your work!  - 
 
This is still very much (and may always be) evolving, but I've been working on a way to help code and test LED patterns in Javascript.

http://codepen.io/jedimasta/pen/eBWazY

Yeah, it's called a NeoPixel Emulator, but it's just a name since it doesn't use libraries anyway. My hope is that someone far more knowledgeable than I in both Javascript and the FastLED library (or neopixels for that matter) can take a look and branch it off, making for a more robust tool.

I tried to make it so that anything inside the loop function would closely mirror ardunio sketch code so that transitioning would be copy/paste with minor adjustments.

I'm happy to hear comments, concerns and critiques. Enjoy!
An attempt to recreate the Adafruit NeoPixel API in javascript as a sort of sandbox to develop LED strip patterns....
3
1
Leon Yuhanov's profile photoDougal Campbell's profile photoChristopher Kirkman's profile photo
3 comments
 
Saw yours Dougal, and it certainly inspired mine, but my goal was to write something that more closely mimicked the arduino and fastLED/NeoPixel code.
Add a comment...
 
Forgive me if this ends up being a double post, cuz it looks like my previous one disappeared.

Is there some sort of limitation to the number of LEDs FastLED can drive or is my code wrong. I'm using the Color Palette Wave sample to do some basic color transitions for a 5m strip (300 pixels total) strip of neopixels. The gradient only seems to be working on 1/3 or 1/2 of the strip with the remainder staying a single color (albeit with one dark pixel that moves down the strip).

Code attached below. I'm driving everything with a first gen Ardunio Uno, external 5v power supply with the recommended capacitor and resistor in place. Library version 3.001.003. Compiling on Window 10. For the record, everything works as expected using the rainbow Color Wheel of the neopixel library.

1
allanGEE's profile photoChristopher Kirkman's profile photo
10 comments
 
It's at half bright and looks pretty good I think. If it really were a quick test, I'd give it a shot, but like I said, wiring up the end would mean renting a ladder to climb up to them with a soldering iron, heat shrink, heat gun etc . . . Just way too much of a hassle.
Add a comment...
 
Super last minute, but I thought I'd try my hand at creating some fireworks-like patterns on my outdoor strip. I've got a decent way to generate the one "charge" but I'm not certain how I could have several go off in succession, having no more than three or whatever at one time.

I mocked up my code in JS on Codepen here. It's not exactly arduino, but it approximates it enough for testing purposes.

https://codepen.io/jedimasta/pen/pNMyox
An attempt to recreate the Adafruit NeoPixel API / FastLED API in javascript as a sort of sandbox to develop LED strip patterns....
1
Add a comment...

Christopher Kirkman

Show off your work!  - 
 
This started off as a neck tie for my office holiday party, but evolved into a Santa hat for my personal Christmas shindig (far more casual). I'm so very pleased with how the fur diffuses the light. Arduino Nano, 15 WS2812b LEDs, a 3.7v battery from one of my quadcoptors and a good, ole fashioned St. Nick chapeau.


5
Jason Coon's profile photo
 
Looks great! Reminds me of this video of +Mark Kriegsman, which makes me smile every single time I watch it. :) youtube.com - Santa hat with lights (1)
Add a comment...
 
This is perhaps a dumb question that I should have asked before installing everything but:

The strip I bought has JST connectors on either end for VIN, DATA, and GND, but each end also has an additional VIN and GND wire coming out of it (see pic).

I capped those off and waterproofed them for my outside installation. Should I have used them? Is there a benefit or are they a kind of backup or way to add power when needed?


2
Chris Creel's profile photoChristopher Kirkman's profile photoMarc Miller's profile photo
3 comments
 
Yes, they provide an easy way to feed in power on longer runs.
Add a comment...
 
I think I know the answer to this, but I'm hoping I'm wrong. I hung a 300 LED strip on the eves of my place. It's something I've been wanting to do to make not only Christmas a little bit more hi-tech and showy, but I could change the code to reflect whatever holiday I wanted.

So, they're up there and I coded up a couple of patterns. In particular, I'm using the palette method to display red and white candy cane stripes. Trouble is, about halfway down the strip, my whites become oranges. I'm also doing the rainbow cycle and a red/green (holly_gp) pattern, which look great.

My fear is that this is a power issue. The arduino uno and the lights are powered by a 5v 2.5 amp wall wart separated on a break out board. Powering both sides of the strip aint happening, cuz I aint gonna rent a ladder again. I could probly get a better power supply, but before I go spending money, I thought I'd consult the boards.

Here's my code:
https://gist.github.com/anonymous/6538b3b02798d6e5d1adec84508ab502 
Holiday House Lights / FastLED
1
Christopher Kirkman's profile photoBrian Lewis's profile photoJustin Eastman's profile photo
13 comments
 
You can use multiple power supplies if you just tie the grounds together. 
Add a comment...
 
If I wanted to write an all encompassing function that passed a string value for the color name to fill_solids, how could I got about doing that? This doesn't work:

void runColor(String color) {
if (currentMillis - previousMillis >= 200) {
previousMillis = currentMillis;
fill_solid(leds, NUM_LEDS, CRGB::color); //
FastLED.show();
}
}
1
Jason Coon's profile photoChristopher Kirkman's profile photo
7 comments
 
I spoke too soon. You were right Jason. Gotta use the CRGB as a variable when calling the function.
Add a comment...
 
Freshly updated demo reel
Motion Graphics and Visual Effects
1
Add a comment...
Collections Christopher is following
Work
Skills
After Effects, Photoshop, Design, drawing, animation
Contact Information
Work
Email
Public - 5 months ago
reviewed 5 months ago
Public - 6 months ago
reviewed 6 months ago
Unfortunately, this once fun and casual casino has suffered more than the larger chain resorts from the dwindling Vegas tourism of recent years. Half of the casino floor is empty save for a handful of cars recognizable from movies and TV shows. One of the draws to the outskirts resort was their mix of old and new, combining the high tech video slots with real coin dollar, quarter and nickel reel machines for a touch of the old Vegas. But the removal of those and barely a half dozen table stations aren't enough to make one want to stay in what are very basic rooms by today's standards, even at rock bottom rates. At best, the Gold Strike is little more than an old West themed rest stop between State line and the Las Vegas Strip with a gas station and a Denny's.
• • •
Public - 6 months ago
reviewed 6 months ago
Easily our favorite place on the strip to gamble. Friendly dealers, a great array of both table and slot games and convenient food options. Low ceilings means smoke can sometimes linger, but not terribly so. Finally, visitors with children will quickly find there is nothing for the little ones to do, so be forewarned.
Public - 6 months ago
reviewed 6 months ago
8 reviews
Map
Map
Map
Just passed through. A little annoyed at the deal-mongers posted at either entrance, but that's typical for mid sized casinos. Harrah's is a clean, no frills resort, with the latest slots and classic table games, located mid-strip.
Public - 6 months ago
reviewed 6 months ago
Part mini condo, part hotel room, amenities include limited wifi (2 device maximum) kitchen and separate bedroom and living room spaces, each with their own television. Good for families, the resort features a large pool area with water slides and hot tub stations without a casino distraction. Surely gamblers are welcome but will need to cross the freeway to the Silverton or drive a few miles north to the strip to get their betting fix.
Public - 6 months ago
reviewed 6 months ago
Overrated fare. Despite a good value, the barely-there burgers are tasteless aside from the onions and pickle chip placed on each bun. Neither the wait for the chain to come to the west coast, not the line to get to the counter are worth it.
Public - 6 months ago
reviewed 6 months ago