Light Cube

by mccarmo Feb 1, 2017
Download All Files

Thing Apps Enabled

Please Login to Comment

Thanks for creating and sharing this design, i altered it a little bit to fit 60 ws2812B led's inside.
Since it was a present i put the birthayboy his name in the top cover,and i placed a minion pennybank on top.
It came to be a very well recieved bithday present, so thanks again :-)

What did you change in the code for more pixels??

in the code i used (fastled demoreel code) they ask you how many leds you use..

So I've got to change it in the neopixel code?

i never used the neopixel code but i googled it and you have to change the "#define PIXEL COUNT" into the amount of leds you use the're also several YT vids about it like https://www.youtube.com/watch?v=KBKcZLF59kY

I must be hella retarded cause I can't even get into the neopixel library, I've got it installed just can't get to it to modify it.
Is there any chance you could upload the code you used

i like this but i can't get this to work. i have flashed it and i actually change it to 16 leds as i have one of the ring neopixels. From what i understand of the code neopixels go on pin 3 and tilt sensor pin 2? I have purchased 3 ky-020 which appears to be the same one in the video. however i hook it up to 5v and it does nothing. The leds turn on to their initial state but they never change. What am I missing here?
The S on the tilt sensor goes to 2? in the code do you ever have to define the tiltsensor pin? like you did for 3? or calling it an int is fine?

Hi staypatrick! Sorry for taking too long to respond! I'm very sick and still trying to find out what I have (for the past two weeks) so I'm not having a lot of free time on my PC. Anyway, I remember that I have had that exact same problem and in the end was my sensor..The funny thing was that I simply changed the wires and maybe the arduino port (if I remember) and It started to work! Are you still with the problem?

ah no good! that is ok though. Yeah since i messaged you i have sort of figured it out. I have been able to get it to change colors if I attach a piece of wire on the pin. because then if I touch it will change colors because it is a floating voltage and body resistance changes the voltage on it. I have had 3 of the same sensors and have tried two of them. I believe the issue is, that the sensors have what appears to be a pull up resistor on them making the pin always high. which is messing it up. on one of them i took it off but that did not help at all. I will keep troubleshooting. I might change sensors and I have a different type of vibration sensor laying around.

This is a really cool design. I'm printing it now.

With the updated: lum3_v2.stl would you still suggest scaling it down a couple percent, or print it at 100% now?

I have not printed it yet but it should fit at 100% without any adjustment! You can use a sanding paper to adjust it if too hard to fit or a little hot glue if too loose. :)

Thank you for the reply. I'm almost done with printing! Only 1 hour left on the final piece.

Would you happen to have a link to the Arduino code used for the project? Sorry if I've missed it somewhere.

When I get home I'll upload it here for you! But it was a very simple code using AdaFruit NeoPixel library! :)

Cool, thank you very much! I've done a little with Arduino and LEDs before, but haven't used a tilt sensor ever.

And so you know, the lum3_v2 fits great at 100% without any modifications. It is snug enough to stay together even when held from the top and/or upside down.

I used an Arduino Nano v3.0:

#include <Adafruit_NeoPixel.h>

#define PIN 3

const int tiltSensorPin = 2;
int seedR = 255, seedG = 242, seedB = 40, tiltSensorState = 1, originalTiltSensorState;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(8, PIN, NEO_GRB + NEO_KHZ800);

void setup() {

void loop() {
tiltSensorState = digitalRead(tiltSensorPin);
if(tiltSensorState != originalTiltSensorState) {
seedR = random(255);
seedG = random(255);
seedB = random(255);
originalTiltSensorState = tiltSensorState;
} else {
for(int i = 0; i < 8; i++) {
strip.setPixelColor(i, seedR, seedG, seedB);

If you have any questions about the code feel free to ask me!

Regards, Marcelo