*                                                                         
                                                                *                                                                         
                                                 *              *              *                                                          
                                                   *            *            *                                                            
                                                     *                     *                                                              
                                                       +-----------------+                                                                
                                                       |     __---__     |                                                                
                                                       |   _/       \_   |                                                                
                                                       | _/           \_ |                                                                
                                                       |/     +---+     \|                                                                
                                              * * * *  |      |   |      |  * * * *                                                       
                                                       |\_    +---+    _/|                                                                
                                                       |  \_         _/  |                                                                
                                                       |    \__   __/    |                                                                
                                                       |       ---       |                                                                
                                                       +-----------------+                                                                
                                                     *                     *                                                              
                                                   *            *            *                                                            
                                                 *              *              *                                                          
                                                                *                                                                         
		                                 		*                                                                         
                                                                                                                                                          
                                                                                                                                                          
                                                +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+                                                        
                                                |E|M|E|R|G|I|N|G| |O|B|J|E|C|T|S|                                                        
                                                +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+                                                        

        

Welcome to the Sparkle Labs Emerging Objects class.
The kit is available at: SparkleLabs.com.

Part 1: The Arduino Development Environment

- Introduction

- Setting Up The Arduino - Download and install the Arduino software - Connect your Arduino to your computer

- Blink program

- Setting up the Breadboard

- Debugging with the Serial Port Monitor

- Creating your LED Circuit - Electricity



Project Steps for part 1
  1. Install the Arduino Software.
  2. Test the Arduino Software. Ensure your Arduino software is configured correctly by uploading the blink program.
  3. Customize the Blink Pattern.
  4. See variables changing with the Serial Port
  5. Mount your breadboard on the Arduino.
  6. Create an LED circuit and make it blink.
  7. Try to customize the blink to create your own pattern.
------------ Part 2: Digital and Analog - Blink 2

- Fading: Use PWM to fade an LED

- Blinking and Fading

- Analog Light Sensor

Project Steps for part 2
  1. Add a second LED and make it blink.
  2. Use Pulse Width Modulation (AnalogWrite) to fade an LED.
  3. Blink and Fade at the same time. The delay function halts all activity on the Arduino meaning that our fading LED's brightness wil not change while the delay is happening. We need to rewrite the code without using delay.
  4. Create a Light Sensor. Setup your light sensor and use the readings to control an LED.
  5. Upload a photo of you circuit.
Resources - [Blink Code](https://gist.github.com/arielchuri/6469116 "BlinkCode.ino") - [Blink 2 Code](https://gist.github.com/arielchuri/6469163 "Blink2.ino") - [Fade Code](https://gist.github.com/arielchuri/6469189 "Emerging Objects Class Code") - [IF Statement Reference](http://arduino.cc/en/Reference/If "Arduino - If") - [Blink and Fade Code](https://gist.github.com/arielchuri/6469218 "BlinkandFade.ino") - [Digital/Analog Circuit Diagram (PDF)](http://sparklelabs.com/emergingobjects/Class2circuit.pdf) - [Light Sensor Code](https://gist.github.com/arielchuri/6469254 "Light Sensor code for the Emerging Objects class.") --------------- Part 3: Capacitive Touch Switch - Using the CapSense Library

- Apply CapSense

Project Steps for part 3
  1. Set up a capacitive sensor on your breadboard. You will need jumper wire and a 1M resistor (brown black green)
  2. Test the CapSense Circuit.
    Use the sample CapSense code in a new document to test you circuit.
  3. Integrate the CapSense Code into your code.
    Use the CapSense code in your class code so far.
  4. Edit the Class 3 Code.
    Understand and edit the class 3 code below.
  5. **Assignments:** Add a third LED on pin 10 and name it "Led1". Make Led1 fade up. Make Led1 fade up and then down.
  6. Describe how you want you final nightlight to look and behave.
> My light will be a simple cardbox that is white on the inside and has no top. > When it becomes dark the LEDs will fade up. The LEDs will change color while they are on. They will stay on for 20 minutes and then fade out. > If the LEDs are on when it becomes light out, the LEDs will fade out. > If you pass your hand over it while the LEDs are on the lights will go out and stay out until the next night. > If you pass your hand over it while the LEDs are off, the LEDs will turn on for 1 minute and then fade out (unless it has since become dark out). Resources - [3_1 Code](https://gist.github.com/arielchuri/6466736 "CapSense Test Code") - [CapSense Library Reference](http://playground.arduino.cc//Main/CapacitiveSensor?from=Main.CapSense "Arduino Playground - CapacitiveSensor") - [3_2 Code](https://gist.github.com/arielchuri/6466771 "Using the CapSense data.") - [3_3 Code](https://gist.github.com/arielchuri/6469116 "BlinkCode.ino") -------------- Part 4:Functions and Logic -Using Functions to Organize Code

-Behavioral Flow Chart

-Create the Brains of Your Light

Project Steps for part 4
  1. Organize your Code
    Break your code into functions and test that it is still working.
  2. Create a *Behavior Flow Chart*.
    Create a flow chart that shows a simplified version of the behavior for your light.
  3. Give you object a behavior.
    Use a SWITCH statement to setup the logic for your light.
  4. Test the behavior
    User tesiting is a very important part of design. Tell someone how the light is supposed to behave and then watch them operate it.
  5. Post your Progress
    Post your flow chart as well as a few sentences about your user testing in the project section.
Resources - [4_1 Code](https://gist.github.com/arielchuri/6466672 "EmergingObjects_4_1.ino") - [4_2 Code](https://gist.github.com/arielchuri/6466625 "EmergingObjects_4_2.ino") - [4_3 Code](https://gist.github.com/arielchuri/6466456 "Final code for class 4 of Emerging Objects") Flow Chart ``` // // +-----------+ // +-----> LIGHT OFF <---------------------------+ // | +-----+-----+ | // | | | // | | | // | +-----V-----+ +----------+ | // | | IS IT | | TOUCH | | // | | |---NO---> |--NO---> // | | DARK? | | SENSOR | | // | +-----+-----+ +-----+----+ | // | | | | // | | YES | // | YES | | // | | | | // | <--------------------+ | // | +-----V-----+ | // | | LIGHTS ON <--------------+ | // | +-----+-----+ | | // | | | | // | | NO | // | | | | // | +-----V-----+ +-----+----+ | // | | IS IT | | TOUCH | | // +-----| |--YES---> |--YES--+ // | DARK? | | SENSOR | // +-----------+ +----------+ // ``` ------------------------------------------- Part 5: Plastic -Design the enclosure How will the plastic fit together. The lid. Hole for the USB cable. -Creating a File for laser cutting Making squares to size and deleting lines.

-Ordering From [Ponoko](https://www.ponoko.com/ "3D printing, laser cutting – design, make &amp; build your own products with Ponoko") .todo Order solvent and applicator as well. -Contructing with Acrylic

Project Steps
  1. Design your enclosure.
  2. Create your EPS file for lasercutting
  3. Order your Acrylic and other supplies.
  4. Construct your Enclosure.
Resources - [Ponoko.com](https://www.ponoko.com/) - [SketchUp file](https://sparklelabs.com/emergingobjects/Projector1Acrylic.skp) - [Orgone Radiator Laser File](https://sparklelabs.com/emergingobjects/Orgone_Radiator_Laser.pdf) - [Ponoko laser template](https://sparklelabs.com/emergingobjects/emergingObjects_Ponoko_r.eps) - [Ponoko.com](https://www.ponoko.com/) - [Acrylic cement and applicator](https://www.amazon.com/Weld-Acrylic-Adhesive-Applicator-Bottle/dp/B0096TWKCW/189-9338715-4849104?ie=UTF8&keywords=weld%20on&qid=1391722055&ref_=sr_1_1&sr=8-1) Part 6: Create Your Final Light -Putting together your final circuit.



Circuit Diagram // Final Circuit // +--------+ // | TOUCH | // | SENSOR | // | | | // +------+ | // ARDUINO | // +-----------+ | // | GND|-----------------+ | // | | | | // | 13|-[R220]--[LED>]--O | // | 12| | | // | ~11|-[R220]--[LED>]--O | // | ~10|-[R220]--[LED>]--O | // +--[PHOTO]--|5V ~9|-[R220]--[LED>]--O | // | |GND 8| | | // O---[R10K]--|GND 7| | | // | | ~6|-[R220]--[LED>]--O | // +-----------|A0 ~5|-[R220]--[LED>]--O | // |A1 4|----[R1M]--------+--O // |A2 ~3|-[R220]--[LED>]--+ | // |A3 2|--------------------+ // |A4 1| // +-----------+ // ------------------------------------------------------- ##End Document