Introduction: Light Timer /Infinity Mirror NEOPIXEL
For our first instructable we made a light timer which is programmed to visually showcase the passing of time. It will be helpful for getting a more organized routine, using the pomodoro timing technique.
We combined a couple of tutorials that we found in instructables.
https://www.instructables.com/id/Infinity-Mirror-Cl...
https://www.instructables.com/id/Arduino-controlle...
Step 1: Materials
-Electronics: Arduino Uno
-Energy source (5volts)
-One meter of NEOPIXEL LED strip (our has 59 lights)
-Connectors
-For the infinity mirror:
-60 diameter mirror circle
-60 diameter one way mirror screen
Veneer 60 diameter MDF circle (thickness doesn't matter it's only for the back of the lamp)
Step 2: Coding
LETS MAKE IT!
Electronics: Download and install the NEOPIXEL Ada fruit library, you can find instructions and the library in this link:
https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-installation
Open the Arduino program Im your computer. We highly recommend you to try the examples of the neopixel library to get a sense of it.
The code: We modified the code from the example "simple" to accommodate our needs, for example colour, number of lights, function, timing, etc.
This is our code:
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include #ifdef __AVR__ #include #endif
// Which pin on the Arduino is connected to the NeoPixels? // On a Trinket or Gemma we suggest changing this to 1 #define PIN 6
// How many NeoPixels are attached to the Arduino? #define NUMPIXELS 60
// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals. // Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest // example for more information on possible values. Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_RGB + NEO_KHZ800);
int delayval = 1000; // delay for a second
void setup() { // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket #if defined (__AVR_ATtiny85__) if (F_CPU == 16000000) clock_prescale_set(clock_div_1); #endif // End of trinket special code
pixels.begin(); // This initializes the NeoPixel library. }
void loop() {
// For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.
for(int i=0;i
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255 pixels.setPixelColor(i, pixels.Color(255, 214, 170)); //
pixels.show(); // This sends the updated pixel color to the hardware.
delay(delayval); // Delay for a period of time (in milliseconds).
}
Step 3: Circuit
The circuit: Connect the neopixels: outside wire to ground,
middle to PIN 6 in Arduino, other outside to power 5v (check if your neopixels need more or less than 5v) Connect the ground from your neopixels to your power ground as well as your Arduino ground.
Turn on and the lights: it should work as a series where the first turns on, then second ( first stays on) and so on.
You're done with the electronics, now lets form the outside.
Step 4: Outside
Here is a diagram that shows how the parts fit together:
Form the Veneer to fit the 60 cm mirror and assemble the things together
Hide your electronics in between the mirror and the back MDF board Drill a hole that lets your wire connect to power.
Step 5: Done!
You're done! Change the duration of the circuit if you need so! Time it for 60 minutes like did or change it for longer/less in the code "delay" part.
We hope you find this handy!