Page 1 of 6 123456 LastLast
Results 1 to 20 of 107

Thread: What have you been doing?

  1. #1
    I accidentally a whole post. Carbon's Avatar
    Join Date
    Dec 2008
    Posts
    844
    Cookies Given
    84
    Cookies Received
    72

    What have you been doing?

    What have you been coding/working on the last couple of weeks?
    This really spreads across the coding corner and the music/video subforums.

    Personally, I've just finished my own DIY Ambilight system as you can see in the following video:


    It works great and I'm dead chuffed with myself. It just lights my wall to any RGB colour I specify, in this case we're taking input from a program called Boblight which I've set up to sample the pixels on my main monitor. This works at full speed (60fps) for movies and games!

    The lighting itself is done with 2 metres of dealextreme LED strips (about 50 RGB LEDS), total cost is about £20. Only 2 channels because the arduino only has 6 PWM outputs.

    I've still a way to go with this setup, I plan to hook it up to the TF2 console to flash green when I get a kill, and go red on death. I'm also going to hook it up to twitter so that any random person can tweet a hex color to it and change the color of the lighting in a students room in England to their chosen color for 5 minutes.

    So that was me, how about you?
    Cookie given from: grom.ps


  2. #2
    Greater crested hermit ninja Boylee's Avatar
    Join Date
    Nov 2008
    Posts
    7,754
    Cookies Given
    6,342
    Cookies Received
    5,882

    Re: What have you been doing?

    Wow. That's awesome. Loving your work
    Also the original transformers movie rocks my world

    I've been working on maps of late, cp_cruff & ctf_chicane
    cp_triplet - ctf_chicane - cp_cruff - pl_clifftop

    --------------------------------------------------------------
    [UC] Boylee is in an unknown country.

  3. #3
    Unreformed Convict SleeperService's Avatar
    Join Date
    Nov 2008
    Posts
    990
    Cookies Given
    188
    Cookies Received
    306
    Blog Entries
    10

    Re: What have you been doing?

    nice one

  4. #4
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: What have you been doing?

    I've been a bit disappointed in the world, so did not much coding except for some additions to the Fortress Cookies...

    Nice work Carbon!
    Care to give some links? The DIY-part on ambilight is extremely tempting

  5. #5
    I accidentally a whole post. Carbon's Avatar
    Join Date
    Dec 2008
    Posts
    844
    Cookies Given
    84
    Cookies Received
    72

    Re: What have you been doing?

    Ok so the software I'm using to sample the screen and output a result is called boblight. Then I've got 2 of these (free shipping) which I've cut up and soldered back together around my monitor. The circuit is really simple, its just those LEDs connected to 6 Pulse Width Modulated outputs via an LM2003 (costs about 50p).

    Now as I have an arduino, that's all I need, see this guy who's done the same. The code is dead simple, it uses the LTBL protocol.

    Without an arduino, you can get the same effect using a pc soundcard or using a PIC, this site has some information on that approach

    Hope that wasn't too confusing, basically the software side is easy and the hardware doesn't take much work.


  6. #6
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: What have you been doing?

    So I need:

    Software:
    * Boblight
    * Arduino

    Hardware:
    * Arduino (Duemilanove?)
    * LM2003?
    * LED-lights

    What on the Arduino? Is it the Duemilanove? Like the Arduino Duemilanova EZ-StarterKit 1 or do I need more items like Arduino Duemilanova EZ-StarterKit 2 to play a bit more with the concept?
    And the LM2003? What is that? Cannot find it on eztronics.nl or conrad.nl, so it might be an english component? My dad is an electronics teacher, so if you can show it, I'm sure we can find a suitable one too.

    If I understand it correctly:
    Start:
    * The LED is connected to the Arduino.
    * The Arduino is connected to the PC on USB.

    Loop:
    * Boblight determines color on the screen.
    * The color is passed from Boblight to Arduino by LTBL
    * Arduino changes the color on the LED

  7. #7
    I accidentally a whole post. Carbon's Avatar
    Join Date
    Dec 2008
    Posts
    844
    Cookies Given
    84
    Cookies Received
    72

    Re: What have you been doing?

    Oh my mad, its a ULN2003 - Darlington Pair array. The Duemilanove is the most recent arduino version, and the one I have. With the kits, it really depends how far you want to go with it. If you want to get into more ardunio projects, you'll benefit from the second kit, if you just want it for this purpose then don't bother. I have this kit, if they ship to europe you'll get a hell of a lot more for your money thanks to the exchange rate.

    Here's my code, sorry it isn't commented - I wasnt planning on anybody else seeing it.
    Spoiler: Reveal
    Code:
    byte cnlData[6];
    int cnlPins[6] = {3, 5, 6, 9, 10, 11};
    
    void setup() {
      Serial.begin(9600);
    
      for (int i=0; i<6; i++) {
        cnlData[i] = 0;
        pinMode(cnlPins[i], OUTPUT); // init pin for channel
      }
      output();
    }
    
    void loop() 
    {
      int data;
      if (Serial.available() >= 4) {
        data = Serial.read();
        if (data == 0x55) {
          data = Serial.read(); 
          if (data == 0xAA) {
            data = Serial.read(); 
            if (data < 127) {readCnlData(data);}
            else {readCmd(data);}
            return;
          }
        }
      }
    }
    
    void output() {
      for (int i=0; i<6; i++) {
        analogWrite(cnlPins[i], cnlData[i]);
      }
    }
    
    void readCnlData(int startCnl) {
      int numCnls = Serial.read();
    
      while (Serial.available() < numCnls * 2) {
        delay(10);
      }
    
      byte data;
      for (int i = 0; i < numCnls; i++) {
        data = Serial.read();  // first color byte from boblight;
    
        if (startCnl+i < 6)
          cnlData[startCnl+i] = data;
    
        data = Serial.read();  // we ignore the second byte as arduino only has 8 bit PWM;
      }
      output();                                    
    }
    
    void readCmd(int cmd) {
      int numBytes = Serial.read();
      
      if (cmd == 0x81) {
        sendValues();
      }
      else if (cmd == 0x83) {
        output();                                    
      }
      else if (cmd == 0x84) {
        for (int i =0; i<6; i++) {
          cnlData[i] = 0;
        }
        output();                                    
      }
    }
    
    void sendValues() {
        int startCnl = Serial.read();
        int numCnls =  Serial.read();
       
        Serial.print(0x55, BYTE);
        Serial.print(0xAA, BYTE);
        
        if (numCnls <=0 || startCnl >= 6) {
          Serial.print(0, BYTE);
          Serial.print(0, BYTE);
        }
        else {
          numCnls = min(6 - startCnl, numCnls);
          Serial.print(startCnl, BYTE);
          Serial.print(numCnls, BYTE);
         
          byte byte1, byte2;
          for (int i=startCnl; i< startCnl + numCnls; i++) {
             byte1 = cnlData[i];
     	 byte2 = 0x00;
             Serial.print(byte1, BYTE);
             Serial.print(byte2, BYTE);
          }
       }
    }
    Last edited by Carbon; 17-01-2010 at 17:59.


  8. #8
    Panics when ubered & Excessively Generous Tstrike's Avatar
    Join Date
    Dec 2008
    Posts
    2,113
    Cookies Given
    306
    Cookies Received
    1,306
    Blog Entries
    1

    Re: What have you been doing?

    Revising ladder logic about as advanced as i get i guess.

  9. #9
    (1)Spudd has joined the game. Spudd's Avatar
    Join Date
    Dec 2008
    Posts
    1,936
    Cookies Given
    2,342
    Cookies Received
    626

    Re: What have you been doing?

    I've been running and trying to eat healthily

    did about 2.8 miles yesterday, and 1.7 miles today. Hoping it's not a phase

  10. #10
    Registered Member satanpenguin's Avatar
    Join Date
    Nov 2009
    Posts
    57
    Cookies Given
    10
    Cookies Received
    14

    Re: What have you been doing?

    Workwise, I've been doing small bugfixes for a web CMS. Nothing to write home about, I hope the next project will provide more fun. As we are having some slow time at work, I intend to improve my knowledge of CSS (and I mean cascading style sheets; the other CSS has a very steeper learning curve ).

    If I get some time I want to play a bit with LÖVE, a framework for 2D game development in Lua.

    Other short-term plans include finding a nice used car, doing some more sport, begin plans for new PC (last time I did that was 5 years ago. Just to think of getting up to date in current processors, GPUs and mobos gets me tired).

    I also want to find some group of players to play the pen&paper RPG Eclipse Phase.

  11. #11
    I accidentally a whole post. Carbon's Avatar
    Join Date
    Dec 2008
    Posts
    844
    Cookies Given
    84
    Cookies Received
    72

    Re: What have you been doing?

    LOVE looks cool! Good chance to learn LUA and be motivated for it.

    Excuse my ignorance but what's the other CSS? (the music group?)


  12. #12
    🍕Mr🍕Man🍕The🍕Pizza🍕Fan🍕 Post Script's Avatar
    Join Date
    Jan 2009
    Posts
    2,903
    Cookies Given
    2,946
    Cookies Received
    1,324
    Blog Entries
    2

    Re: What have you been doing?

    Quote Originally Posted by Carbon View Post
    Excuse my ignorance but what's the other CSS? (the music group?)
    Attached Images
    Cookie given from: Carbon

  13. #13
    I accidentally a whole post. Carbon's Avatar
    Join Date
    Dec 2008
    Posts
    844
    Cookies Given
    84
    Cookies Received
    72

    Re: What have you been doing?

    Oh fork


  14. #14
    Administrator
    L4D2 Group Co-ordinator
    Hawk's Avatar
    Join Date
    Nov 2008
    Posts
    6,724
    Cookies Given
    1,982
    Cookies Received
    3,443
    Blog Entries
    2

    Re: What have you been doing?

    Lol I didn't get it either
    Last.Played


  15. #15
    🍕Mr🍕Man🍕The🍕Pizza🍕Fan🍕 Post Script's Avatar
    Join Date
    Jan 2009
    Posts
    2,903
    Cookies Given
    2,946
    Cookies Received
    1,324
    Blog Entries
    2

    Re: What have you been doing?

    This is, of course, an assumption.

  16. #16
    ლ(ಠ益ಠლ) Logan's Avatar
    Join Date
    Nov 2008
    Posts
    6,349
    Cookies Given
    4,720
    Cookies Received
    3,341
    Blog Entries
    15

    Re: What have you been doing?

    Quote Originally Posted by Carbon View Post
    Oh my mad, its a ULN2003 - Darlington Pair array. The Duemilanove is the most recent arduino version, and the one I have. With the kits, it really depends how far you want to go with it. If you want to get into more ardunio projects, you'll benefit from the second kit, if you just want it for this purpose then don't bother. I have this kit, if they ship to europe you'll get a hell of a lot more for your money thanks to the exchange rate.

    Here's my code, sorry it isn't commented - I wasnt planning on anybody else seeing it.
    Spoiler: Reveal
    Code:
    byte cnlData[6];
    int cnlPins[6] = {3, 5, 6, 9, 10, 11};
    
    void setup() {
      Serial.begin(9600);
    
      for (int i=0; i<6; i++) {
        cnlData[i] = 0;
        pinMode(cnlPins[i], OUTPUT); // init pin for channel
      }
      output();
    }
    
    void loop() 
    {
      int data;
      if (Serial.available() >= 4) {
        data = Serial.read();
        if (data == 0x55) {
          data = Serial.read(); 
          if (data == 0xAA) {
            data = Serial.read(); 
            if (data < 127) {readCnlData(data);}
            else {readCmd(data);}
            return;
          }
        }
      }
    }
    
    void output() {
      for (int i=0; i<6; i++) {
        analogWrite(cnlPins[i], cnlData[i]);
      }
    }
    
    void readCnlData(int startCnl) {
      int numCnls = Serial.read();
    
      while (Serial.available() < numCnls * 2) {
        delay(10);
      }
    
      byte data;
      for (int i = 0; i < numCnls; i++) {
        data = Serial.read();  // first color byte from boblight;
    
        if (startCnl+i < 6)
          cnlData[startCnl+i] = data;
    
        data = Serial.read();  // we ignore the second byte as arduino only has 8 bit PWM;
      }
      output();                                    
    }
    
    void readCmd(int cmd) {
      int numBytes = Serial.read();
      
      if (cmd == 0x81) {
        sendValues();
      }
      else if (cmd == 0x83) {
        output();                                    
      }
      else if (cmd == 0x84) {
        for (int i =0; i<6; i++) {
          cnlData[i] = 0;
        }
        output();                                    
      }
    }
    
    void sendValues() {
        int startCnl = Serial.read();
        int numCnls =  Serial.read();
       
        Serial.print(0x55, BYTE);
        Serial.print(0xAA, BYTE);
        
        if (numCnls <=0 || startCnl >= 6) {
          Serial.print(0, BYTE);
          Serial.print(0, BYTE);
        }
        else {
          numCnls = min(6 - startCnl, numCnls);
          Serial.print(startCnl, BYTE);
          Serial.print(numCnls, BYTE);
         
          byte byte1, byte2;
          for (int i=startCnl; i< startCnl + numCnls; i++) {
             byte1 = cnlData[i];
     	 byte2 = 0x00;
             Serial.print(byte1, BYTE);
             Serial.print(byte2, BYTE);
          }
       }
    }

    and they do ship to Holland....
    Not in the UK? This kit is also available in the USA (and shipped worldwide) (adafruit industries) and in Holland (floris.cc)

  17. #17
    Registered Member satanpenguin's Avatar
    Join Date
    Nov 2009
    Posts
    57
    Cookies Given
    10
    Cookies Received
    14

    Re: What have you been doing?

    Quote Originally Posted by Post Script View Post
    This is, of course, an assumption.
    You were right. I can't get used to being headshot so often in a game

  18. #18
    Registered Member satanpenguin's Avatar
    Join Date
    Nov 2009
    Posts
    57
    Cookies Given
    10
    Cookies Received
    14

    Re: What have you been doing?

    BTW been watching arduino for a long time, about time I got one and started playing. I even got the intro book by Massimo Banzi, its creator. It's quite simple stuff to grasp from what I've read.

    These guys (Medialab Prado, from Madrid -check it out, it's in english too-) are the main users of our CMS and they do a *lot* of electronic art projects, visualization, etc. I guess I should go visit them more often, I live a walk away from them.

  19. #19
    Badministrator grom's Avatar
    Join Date
    Nov 2008
    Posts
    4,256
    Cookies Given
    2,297
    Cookies Received
    4,806

    Re: What have you been doing?

    Quote Originally Posted by Colt View Post
    and they do ship to Holland....
    Not in the UK? This kit is also available in the USA (and shipped worldwide) (adafruit industries) and in Holland (floris.cc)
    I can personally vouch for adafruit industries - amazing bunch of people.

    Also Arduino FTW!

    If you're into that kind of thing then also check out evilmadscientist.com and get a subscription to MAKE Magazine
    ---
    (aka JennyCide.ps)
    putting the Rage in Average
    gromblog (inactive at present)
    Twitter

  20. #20
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: What have you been doing?

    The Arduino Duemilanova start set arrived today
    It is indeed really simple to create working stuff, combining software and hardware.

Page 1 of 6 123456 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •