CodeWalrus

Development => Hardware => Topic started by: Yuki on December 05, 2016, 07:44:39 AM

Title: My Christmas tree
Post by: Yuki on December 05, 2016, 07:44:39 AM
(https://scontent-ord1-1.xx.fbcdn.net/t31.0-8/15259440_10207582744789923_5246079704294876963_o.jpg)
Video of it in action (https://tg.codewalr.us/file_341.3gp)
(sorry for bad lighting but you get my point :P)

I think I made that a few years ago, made it again this year, got some fakeish plastic Christmas tree-like cone and a battery-powered set of lights at the dollar store, put those together, wired where the batteries would be to my TI C2000 Launchpad (because my brother has my Arduino), fired up the Fade example in Energia (http://energia.nu/) and there you go, a programmable USB Christmas tree. Still have to figure out how to serial port with Energia, but had I have my Arduino, could have done some fancy blinking stuff with it. Not that I already can do fancy stuff.

Are you doing some Christmas-themed projects this year?
Title: Re: My Christmas tree
Post by: p2 on December 05, 2016, 08:50:31 AM
that looks really nice ;D
But I'm note sure if I'm supposed to stare at the tree or that huge mouth x.x

sadly I have no tech-related projects this year for christmas ._.
Title: Re: My Christmas tree
Post by: Dream of Omnimaga on January 02, 2017, 02:26:48 AM
I remember this juju and this was kinda cool. WOuld be interesting to see if this was possible with a larger tree and with different stuff, eg my music :P
Title: Re: My Christmas tree
Post by: Yuki on January 02, 2017, 02:56:39 AM
Some people do that with their entire house decorations.
Title: Re: My Christmas tree
Post by: p2 on January 13, 2017, 01:49:25 PM
the facebook pic in the first post turned into a 404 D:
Title: Re: My Christmas tree
Post by: Dream of Omnimaga on January 13, 2017, 05:18:28 PM
Quote from: Juju on January 02, 2017, 02:56:39 AM
Some people do that with their entire house decorations.
Yeah I saw that on Youtube O.O. Wasn't there an house with Star Wars-themed Christmas decorations a few years ago?
Title: Re: My Christmas tree
Post by: WholeWheatBagels on January 15, 2017, 06:11:42 AM
Quote from: Juju on January 02, 2017, 02:56:39 AM
Some people do that with their entire house decorations.

there is a guy near me that every year sets up lights over the entirety of his yard / house and has it set to music with patterns and whatnot.
Title: Re: My Christmas tree
Post by: aetios on January 15, 2017, 07:46:25 AM
Wow, that sounds annoying haha.
Title: Re: My Christmas tree
Post by: p2 on January 15, 2017, 09:50:23 PM
And you never sneaked over and pulled the plug...? It would even be a good thing as you prevent a massive waste of energy ;)
Title: Re: My Christmas tree
Post by: Yuki on January 15, 2017, 10:24:29 PM
It's January 15th and I still have my tree plugged in. Hehehe.
Title: Re: My Christmas tree
Post by: Dream of Omnimaga on January 16, 2017, 05:40:14 AM
Quote from: p2 on January 15, 2017, 09:50:23 PM
And you never sneaked over and pulled the plug...? It would even be a good thing as you prevent a massive waste of energy ;)
The power bill must be insane with so many lights. I wonder how much it would be with LED lights, though?
Quote from: Juju on January 15, 2017, 10:24:29 PM
It's January 15th and I still have my tree plugged in. Hehehe.
I have yet to remove my christmas decorations lol, because I was sick two weeks ago, which was around when I originally planned to remove them, and then I got too busy <_<

But again, in Quebec City there is a neighborhood in which they even let the Christmas lights turned ON until April or so (or at least until there's no snow anymore).
Title: Re: My Christmas tree
Post by: Yuki on January 19, 2017, 09:30:39 AM
Fun fact: Christmas tree is now powered by my Raspberry Pi.

Code (node.js) Select
var wpi = require('wiring-pi');
wpi.wiringPiSetup();
wpi.pinMode(1, wpi.PWM_OUTPUT);
var dir = 1;
var val = 511;
function sweep()
{
  if(val <= 0 || val >= 1023)
    dir *= -1;
  val += dir;
  wpi.pwmWrite(1, val);
}

setInterval(sweep, 3);