• Categories
    • Unread
    • Recent
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Arduino Powered PC Lighting

    Scheduled Pinned Locked Moved Development and Coding
    arduinoledws2801
    2 Posts 1 Posters 1.0k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ScuzzS Offline
      Scuzz
      last edited by Scuzz

      Over the last week or so I have been looking at either creating an Arduino controlled LED set up for my PC or an Ambilight for my TV.
      I originally had the idea to have some individually programmable RGB LEDs inside my PC so I can change the colour scheme when I felt like it. I didn’t want to be tied down to blue, red or green.

      I was looking at the thin LED strips but the ones in my local electronic shop were not individually addressable and they were quite expensive.
      After some research on different projects for PC lighting and Ambilights I decided to buy some WS2801 LEDs. These are RGB and are individually programmable, they are also slightly cheaper than the LED strip I saw at my local shop.

      Ebay WS2801 LED UK

      When they arrived I was surprised by how big they actually are. Each LED has its own chip soldered next to it making them quite long.
      50 LEDs seemed like a good amount at the time to fill my whole case with light but after testing them out it inside the case I found that they were too big and to spaced out to be of any use. Unless I can find a way to hide them, the wires, and have an even spread, I don’t think that they look ok inside my PC.

      https://www.youtube.com/watch?v=28G0CsNP6NU

      Sorry for the crappy quality by my HTC One suffers from the purple tinge issue when in low light.

      Scuzz’s Blog Post

      1 Reply Last reply Reply Quote
      • ScuzzS Offline
        Scuzz
        last edited by Scuzz

        Code for the test.

        #include "FastLED.h"
        #define NUM_LEDS 41
        
        #define DATA_PIN 11
        #define CLOCK_PIN 13
        
        CRGB leds[NUM_LEDS];
        
        void setup() { 
          FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
        }
        
        void Pulse(CRGB colour)
        {
        
          for(int i = 0; i < NUM_LEDS; i++) {
            leds[i] = colour;
            leds[i].maximizeBrightness();
          }
          FastLED.show();
        
          for(int i = 0; i < 14; i++) {
            for(int k = 0; k < NUM_LEDS; k++) {
              leds[k].fadeLightBy( 64 );
            }
            FastLED.show();
            delay(50);
          }
        
          for(int i = 0; i < 14; i++) {
            for(int k = 0; k < NUM_LEDS; k++) {
              leds[k] *= 2;
            }
            FastLED.show();
            delay(100);
          }
        }
        
        void UpDown(CRGB colour) { 
        
          for(int i = 0; i < NUM_LEDS; i++) {
            leds[i] = colour;
            FastLED.show();
            leds[i] = CRGB::Black;
            delay(30);
          }
        
          for(int i = NUM_LEDS-1; i >= 0; i--) { 
            leds[i] = colour;
            FastLED.show();
            leds[i] = CRGB::Black;
            delay(30);
          }
        }
        void loop() { 
        
          UpDown(CRGB::Red);
          UpDown(CRGB::Red);
          for(int i = 0; i < 5; i++){
            Pulse(CRGB::Red);
          }
          UpDown(CRGB::Purple);
          UpDown(CRGB::Purple);
          for(int i = 0; i < 5; i++){
            Pulse(CRGB::Purple);
          }
          UpDown(CRGB::Blue);
          UpDown(CRGB::Blue);
          for(int i = 0; i < 5; i++){
            Pulse(CRGB::Blue);
          }
        }
        
        1 Reply Last reply Reply Quote
        • 1 / 1
        • First post
          Last post
        Online Users