Things used in this project

Hardware components:
Ardgen 101
Arduino 101 & Genuino 101
×1
SparkFun Adressable RGB LED Strip
I use this one for easy connectivity but any addressable LED strip will work (with minor adjustments.)
×1
SparkFun Male Barrel Jack adapter
You can often find these at a local electronics store
×1
SparkFun Female Barrel Jack Adapter
×1
SparkFun 3xAA Battery Holder with Switch
×1
SparkFun AA battery
This is a generic battery that can come from anywhere. I just chose SparkFun to keep the supplier list short. You need 3AA batteries.
×3
Pololu Step Up Regulator 12v
This is a convenient way to power the Arduino 101 with the same batteries that power the LED strip.
×1
Regular printer paper- 4 sheets 8.5x 11"
×1
Cardstock paper 100lb, 4 sheets of 8.5 x 11"
×1
White 3/16" Foam Core, enough for four 8.5 x11" pieces
×1
Software apps and online services:
Ide web
Arduino IDE
Blynk logo avatars
Blynk
Adafruit Neopixel Library
Hand tools and fabrication machines:
Hy gluegun
Hot glue gun (generic)
09507 01
Soldering iron (generic)
Xacto knife
Spare xacto blades (#11)
Wire strippers, 12-20 AWG
Access to a printer (that can print on cardstock)
Small screwdriver to tighten the terminals on the barrel jack connectors.

Schematics

Foam-Core patterns (4 pages 8x11)
Print these out on regular printer paper to use as guides for cutting foam-core. You can place them on top and trace with a hobby knife to transfer the pattern through.
Cardstock Patterns
Print on 8.5 x 11" cardstock paper (4 sheets.) These make the houses, sides, and shadow-silhouettes
Cardstock Pattern for Laser Cutter or Vinyl Cutter
If you're lucky enough to have access to a laser cutter or a vinyl cutter, you can use this pattern to cut out your cardstock pieces.
30bn6Le68V1Lpp2spRMw.svg

Code

Shadow Theater Arduino SketchArduino
This sketch uses the Adafruit NeoPixel Library and the Blynk Library. It lets you remote control LEDs in an addressable LED string to create effects in a Shadow Theater.
/*
   Copyright (c) 2016 Intel Corporation.  All rights reserved.
   See license notice at end of file.
*/


///////////////////////THESE ARE THE VARIABLES YOU SHOULD CHANGE TO MATCH YOUR SHADOW THEATER SETUP////////////////////////////////////////

//snow animation lights

int pos[] = {0, 1, 2, 20, 21, 22, 40, 41, 42}; // which LEDs are available for animation?  They will be called in order from left to right.

int numLeds = 9;  //how many animation pixels are in the array above?

int shadowPixel = 59;///  main shadow-casting LED at the end of the strand.

int lightHousePixel = 23; //pixel for the lights in the rear house

int firePixel = 24;  //pixel for flickering firelight for front houses.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



#include <Adafruit_NeoPixel.h>
#include <BlynkSimpleCurieBLE.h>
#include <CurieBLE.h>

#define PIN 6

int v0 = 0;  //variables to hold incoming values from Blynk
int v1 = 0;
int v2 = 0;

int fadeup = 0;   //variables for light animation smoothing
int fadedown = 0;

int firetimer = 0; /// variables to make the fire flicker
int fireinterval = 50;
int flicker = 0;

unsigned long lightcounter = 0;  //variable for counting through the animating lights forever

int stp = 0;  ///light steps for ainimation.  One for the current light to turn it on, and one for the old light to turn it off.
int stpOld = 0;

unsigned long timer = 0;
int interval = 0;


char auth[] = "YourAuthToken";  ///  The Auth Token isn't used by Blynk for BLE currently. If it's turned on in the future, you can get your auth token from your Blynk App and paste it inside the "".

BLEPeripheral  blePeripheral;  ///set up the BLE connection

Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);  ////  set up the light strip.  If your LED strip has more or less than 60 pixels, change the first number to match your strip.


void setup() {
  delay(1000);
  timer = millis();
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'

  blePeripheral.setLocalName("ShadowTheatre");
  blePeripheral.setDeviceName("ShadowTheatre");
  blePeripheral.setAppearance(384);

  Blynk.begin(auth, blePeripheral);

  blePeripheral.begin();
  
  interval = 350;  //time interval of 350ms for snow animation
}


void loop() {
  Blynk.run(); //Blynk stuff for real-time controll
  blePeripheral.poll();
  
  ////////turn on the shadow pixel and control with Blynk
  strip.setPixelColor(shadowPixel, 200 - v2, 160 - v2, 160 - v2); //turns shadow light on, v2 (sent from Blynk app) changes the light.


  //fire
  if ((millis() - firetimer) > fireinterval) {
    firetimer = millis();
    flicker = random(0, 40);  //when a set time interval passes, change the brightness of the fire randomly between 0 and 40.
  }
  if (v0 > 1) {  
    strip.setPixelColor(firePixel, 80 + v0 + flicker, v0 + flicker, 0);  // the fire = the brightness of the slider in Blink, + the flicker value, weighted towards red
  }
  else {
    strip.setPixelColor(firePixel, 0, 0, 0);  //only turn on the fire if the Blynk slider is > 0.
  }

  //houselights
  if (v1 > 1) {
    strip.setPixelColor(lightHousePixel, 200 - v1, v1, 0);  ///  if the Houselights Slider in Blynk is >0, control the house lights in the rear house. else turn off.
  }
  else {
    strip.setPixelColor(lightHousePixel, 0, 0, 0);  
  }

  //snow animation
  if ((millis() - timer) > interval) { //every time the interval passes, move one step forward and reset fades
    stpOld = stp;
    timer = millis();
    lightcounter++;
    stp = (lightcounter % numLeds) ; /// counts over and over from zero to numLeds-1
    fadeup = 0;   //reset fade values every time the interval passes
    fadedown = 170;
  }

  fadeup += 2;
  fadeup = constrain(fadeup, 0, 170);
  
  fadedown -= 2;
  fadedown = constrain(fadedown, 0, 170);
  
  for (int i = 0; i < numLeds; i++) {  //turn all animation LEDs off.
    strip.setPixelColor(pos[i], 0, 0, 0);
  }
  strip.setPixelColor(pos[stp], fadeup, fadeup, fadeup);  ///Set the selected pixel to the current "fadeup" value
  strip.setPixelColor(pos[stpOld], fadedown, fadedown, fadedown);  //Set the old pixel to the current "fadedown" value
  
  strip.show();  //finally, send all the current color values out to the LED strip for display.
}



////  when new signals come in from Blynk, they update the global variables v0, v1, and v2.
BLYNK_WRITE(V0) //The Fireplace Slider Widget is writing to pin V0
{
  v0 = param.asInt();
}
BLYNK_WRITE(V1) //The Houselights Slider Widget is writing to pin V1
{
  v1 = param.asInt();
} BLYNK_WRITE(V2) //Main Shadow LED Slider Widget is writing to pin V2
{
  v2 = param.asInt();
}


////////////////////////////////////////////////////////////////////////////////////////////
/*
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/

Credits

Lucas dvskjxggcv
Lucas Ainsworth

I'm a designer working in the Maker & Innovator Group at Intel.

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

3D-Printed Prank Vibrating Cup
Easy
  • 1,271
  • 14

Full instructions

The instant your prankee lifts up this 3D-printed cup it starts violently vibrating! The electronics separate from the cup for easy washing.

The Magic Display With Arduino - The Mind Reader
Easy
  • 1,512
  • 6

Full instructions

The Magic Display With Arduino can figure out with a few clues what is your choose on a card with 64 options of numbers, letters or symbols.

Very First Hands On Arduino - Voice Activated LED
Easy
  • 770
  • 9

Full instructions

Use voice command to turn LED on or off.

Get Connected! WiFi Registration Using AP Mode!
Easy
  • 1,447
  • 16

Full instructions

Stop reflashing your devices everytime the WiFi password changes! Learn how to use anduinoWiFi and AP mode to initiate WiFi registration!

Temperature Sensor
Easy
  • 401
  • 5

Full instructions

A photon that measures the temperature and humididty with a DHT 22 sensor and communicates the temperature data to another photon.

Car Blinker
Easy
  • 238
  • 4

Protip

Blink for Vehicles, such as bikes and skates. Easy.

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback