Kitty Yeung
Published © CC BY-NC-SA

Laser, Robe, Star Wars?! - Versalume + Adafruit Gemma

Embroidering a freaking laaaaaaseeeerrrrr into clothing ~ Perfect for the holiday season! And it's so bright that it's visible in day light.

IntermediateFull instructions provided12 hours2,099

Things used in this project

Hardware components

Adafruit Gemma
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
USB Li Ion Battery Charger
Adafruit USB Li Ion Battery Charger
×1
Adafruit Lithium Ion Polymer Battery - 3.7v 500mAh
×1
Versalume Single Color Mini Module
×1
Jumper wires (generic)
Jumper wires (generic)
×1
LED (generic)
LED (generic)
×1
Photo resistor
Photo resistor
×1
Small Alligator Clip (generic)
×1
Resistor 100 ohm
Resistor 100 ohm
×1
Resistor 10k ohm
Resistor 10k ohm
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Gemma_Laser_Photoresistor connections

This is a modification from the Arduino LED + photoresistor experiment. As described in the post, LED is replaced by laser. Picture edited on Adafruit's Gemma tutorial.

Code

Gemma_Laser_Photoresistor

Arduino
This is modified from tutorial: https://learn.sparkfun.com/tutorials/sik-experiment-guide-for-the-arduino-101genuino-101-board/experiment-7-reading-a-photoresistor
/*
SparkFun Inventor's Kit 
Example sketch 07

PHOTORESISTOR

  Read a photoresistor (light sensor) to detect "darkness" and turn on an LED when it is "dark" and turn back off again when it is "bright."

This sketch was written by SparkFun Electronics,
with lots of help from the Arduino community.
This code is completely free for any use.
Visit http://learn.sparkfun.com/products/2 for SIK information.
Visit http://www.arduino.cc to learn more about Arduino.
*/


// As usual, we'll create constants to name the pins we're using.
// This will make it easier to follow the code below.

const int sensorPin = 1;
const int ledPin = 1;

// We'll also set up some global variables for the light level a calibration value and     //and a raw light value
int lightCal;
int lightVal;


void setup()
{
  // We'll set up the LED pin to be an output.
  pinMode(ledPin, OUTPUT);
  lightCal = analogRead(sensorPin);
  //we will take a single reading from the light sensor and store it in the lightCal        //variable. This will give us a prelinary value to compare against in the loop
}


void loop()
{
  //Take a reading using analogRead() on sensor pin and store it in lightVal
  lightVal = analogRead(sensorPin);


  //if lightVal is less than our initial reading (lightCal) minus 50 it is dark and         //turn pin 9 HIGH. The (-50) part of the statement sets the sensitivity. The smaller       //the number the more sensitive the circuit will be to variances in light.
  if(lightVal < lightCal - 50)
  {
    digitalWrite(9,HIGH);
  }

  //else, it is bright, turn pin 9 LOW
  else
  {
    digitalWrite(9,LOW);
  }

}

Credits

Kitty Yeung

Kitty Yeung

6 projects • 76 followers
Physicist/Artist/Musician/Fashion Designer/Engineer www.kittyyeung.com

Comments