Author Topic: Case lights for my computer  (Read 4098 times)

posicat

  • Newbie
  • *
  • Posts: 7
Case lights for my computer
« on: January 26, 2013, 12:18:10 pm »
I got the Digispark working with the RBG LED LPD8806 strip that Adafruit sells.  (I had to use an older copy of the libraries I had on hand, the latest LPD8806 wouldn't find the SPI libraries).  I did find out the Digispark seems to be quite happy running off of 3 AA (4.5v) batteries like the Diavolino does, making it perhaps practical for portable applications as well.  I was able to power 10 of the RGB LEDs as well as the Digispark without any trouble.

Here's a video of the testing process, and the current state of the project.

https://www.youtube.com/watch?v=OSKeOUkoLbo
[/color]https://www.youtube.com/watch?v=V7LMKcmAq2Q

ty1911

  • Newbie
  • *
  • Posts: 12
Re: Case lights for my computer
« Reply #1 on: January 26, 2013, 07:55:13 pm »
Thanks for the post.
I am looking to do something similar to your project.

Is it possible to post more info about what you did?
Like a schematic, parts and code?


Thanks,
Alan

posicat

  • Newbie
  • *
  • Posts: 7
Re: Case lights for my computer
« Reply #2 on: January 29, 2013, 01:44:52 pm »
I intend to post more of that as soon as I get time.  I've got a few pictures of the build, but I realized I used one of the ports that the USB port needs for communication, so I'll have to switch it around a little bit before it's considered done.  Also 2 of my LED strips stopped working, so I need to check the solder connection on them.

Eventually I intend the lights on the front of the case to either be in "display mode" (what you see there) or "monitor mode" where they're driven by software on the computer, and can relate temperature, or cpu load via the lights.  A lot of work to do to get to that point though.

posicat

  • Newbie
  • *
  • Posts: 7
Re: Case lights for my computer
« Reply #3 on: May 26, 2013, 08:11:22 am »
Sorry, I never got around to posting source code, my bad.  Here's the code I have so far, it's not "done" (is code ever done?) but it should work.

Part of the code was written for LED light strips wrapped around PVC pipe, that's what the pixelAngle array is for, to store the angle each LED faces away from the PCV at (because I glued the LED's on haphazardly, they didn't all line up, so I fixed it with an array :P)

The real take-away from the code is the strip.setPixelColor(i,strip.Color(r,g,b)); line that actually sets pixel # i to the color.