tonight's tinkering is accompanied by white chocolate stout from spectrum beer company
in vancouver bc this does not look like what i was expecting when i was uh promised a stout
that's not bad it's not as light as it looks so tonight i am just tinkering with these leds here
um they look like standard five millimeter leds just have twice as many pins as you'd expect
normally when you see a 4.5 millimeter led you expect it to be an rgb led and yeah it is you
can see that that's what's going on back here but these are not just your normal rgb leds these are
a serial controllable addressable led which you can kind of guess by
the fact that these ones back here are acting independently and there's only one control wire
controlling them just jumping between them they're not neopixels though they're not ws-2812s
they are in fact pl 9823 what makes them different than the 2812s you might ask
uh there's a couple of things that i've found in my tinkering and research
they have a faster internal uh clock rate which has nothing to do with communication along here
that has to do with the pwm frequencies although i think you can see them kind of pwming here
i was hoping that those would be compatible with the camera but
clearly they're not oh well in to the naked eye you can't see that um these
things are set at about half brightness right now which is why you can see the pwm flickering
there that's more like it now they're running they were running at about 150
out of 255 for brightness on each of the three colors now they're running at full brightness and
i'm not seeing any flickeriness but i guess that makes sense too since there's no pwm happening
anyway um controlling these things is just as easy as controlling uh the standard neopixels or 2012s
the same libraries that we'd use neopixel works for them and fast led works for them
so and right now this is i think yeah this is the neopixel library just standard adafruit library
and well let me show you
so here's one of the demo sketches that comes with the adafruit neopixel library i've just
customized it for my application i've changed the pin number i've changed the number of pixels
i've changed this frequency to 400 kilohertz instead of 800 based on something that i found
in one tutorial online and i've changed the order of the colors
the ws2812 uses green red blue as its sequence these use red green blue so just change that
other than that it's pretty much the way you find it uh as a default example
so down in the loop it's pretty straightforward setting the pixel color to green and then pixels
dot show which uh sends that to the strip or to the leds then a do a happens then i change it
to blue pixels dot show do a and then change it to green pixels dot show and then do a and then
the loop loops around as loops tend to do or you can do the same thing using the fast led library
this is just a demo sketch that comes with the library i've set the count of leds that i'm using
the fast led library has definitions for all different kinds of addressable leds some use
a clock and a data pin some only use a data pin these particular ones only use a data
pin so i've only set that and i've set it to data pin 2 which is what i'm using and
then down in the lengthy list of led types i've uncommented the type that i'm using the pl9823
and then down here is the loop which is doing essentially the same thing as the other
demo sketch that i showed you set the led to green wait a little bit set it to blue wait a
little bit set it to red wait a little bit and then pop through the loop again to the next led
one thing fast led allows you to do is identify colors by names that are defined in the library
or if you don't want to use those you can just use standard rgb numbers if you prefer so that's
all well and good and for anybody who's been playing with addressable leds for a while
it's pretty much identical to any other addressable led the the reason that i got
these ones i think now that i think about it is because at the time i bought them
they were the only addressable leds that i could find in just a standard five millimeter
package which allows you to mount them you know anywhere that you'd use a standard led which is
i thought kind of cool and that allows you to do things like this with the uh normal ws2812s that
come in a 50 50 package yeah you can do you know circuit sculpture and whatnot but i just
like the traditional shape so what i've done here is i've just tied all the positives together all
the negatives together and then tied the data ins and outs together all the way around the circle
so that should work just the same as the other thing and plug that and put this into data two
there we go
again that's nothing too earth shattering but it was a fun thing to put together just
zoning out and soldering up this uh this little guy trying to keep it into a nice perfect circle
that's the challenge of this but what can i use this for well i mean it's just decorative what
like like any of these things what else would you use it for but i figured this is a little
awkward running it off there so i next started experimenting and tinkering with shrinkifying
that a little bit and to do that i figured i'd use the smallest microcontrollers that i have which
are these 80 tiny 85 based uh these things called digisparks the limitations are of course
there's only six gpio but that's okay we only need one for this project
and here is that connection i mean it's it's again nothing startling but
it's just a progression in my tinkering so i have that same things hooked up there and i
have literally the same sketch the same fast led sketch loaded into here with no changes at all
one thing with the digispark bootloader it takes a few seconds before it starts running the program
because that's how it loads its thing but you can see that's the same code that i had running
on this guy back here i think that's the same code that's running back there now actually
yeah it's still targeting eight leds so you get a gap in it so then i started digging around and
trying to see if i had any just a loose 80 tiny 85 so that i could just barge it directly into there
but unfortunately i don't i will in a few months i've ordered some they'll show up in a mail bag
in the meantime i think i'm just going to solder one of these guys into the middle of there
and call it to good just to have a standalone project for now i mean it's again not much of
a project but it is a project and again this wasn't ever intended to be some earth-shattering
revelation i was just tinkering with some random leds that i found in my stash that i'd ordered
years ago so i wonder if i've got a little bit smaller one in here is that smaller
it is okay so until i get some standalone 85s uh
in the mail i think i'll just solder that guy into the middle of there and call it done for now
that data pin should hold it fairly originally in there get the ground pin in here
that ought to do it
and there's a finishing touch i'll just take
a usb cable onto here for power lead just for the fun of it
probably other ways i could do it but for now that'll do this is not a permanent
solution this is just as i said a first attempt so let's see how it looks
oh yeah and i changed the sketch that this thing's running too
so it's very very similar to the one that's back there it's got eight leds defined i'm
using the numeric values for rgmb rather than the color names and i've just got the random
number generator picking a random red green and blue each time it goes through the loop
so each time it writes another led it's going to be a slightly different random color
i'm just going to keep doing that i thought that was kind of a kind of a cool thing and i mean
the sky's the limit really because it's just software but i don't know i had fun with this
i explored a part that i hadn't played with before and i got to play with a little bit
of this circuit sculpture kind of stuff so oh no i think tonight's a win and even the beer's okay
uh thanks for watching uh questions comments down below as usual um yeah i'll talk to you later