Zhenxuan’s homework 9

This is my final photo of the costume.
These are my making process.

This is my sketch.

And this is the image that inspiration me to make a wand. I learn from the part of this wand to make my own.

The material and tools:

  1. Wood club
  2. Kitchen paper
  3. Masking tape
  4. Soldering tools
  5. Spray-paint
  6. Wire
  7.  Ribbon
  8. Easter Grass

Arduino code

// Code by Erin St. Blaine for Adafruit Industries

// Color Touch Pendant Tutorial: https://learn.adafruit.com/color-touch-pendant-necklace/introduction

// Two neopixel rings connected on pin 1 will cycle through gradient colors when the pendant is touched.  For Gemma M0.

#include “Adafruit_FreeTouch.h”

#include <Adafruit_NeoPixel.h>

#define CAPTOUCH_PIN 0  //capacitive touch pin

#define NEOPIXEL_PIN 1  //neopixel ring pin

#define NUM_LEDS    16  //how many pixels total

//#define LED_TYPE    WS2812

//#define COLOR_ORDER GRB

Adafruit_NeoPixel strip(NUM_LEDS, NEOPIXEL_PIN, NEO_GRBW + NEO_KHZ800);

//CRGB leds[NUM_LEDS];   //LED array  

// Calibrating your capacitive touch sensitivity: Change this variable to something between your capacitive touch serial readouts for on and off

int touch = 400;    

long oldState = 0;

// set up capacitive touch button using the FreeTouch library

Adafruit_FreeTouch qt_1 = Adafruit_FreeTouch(CAPTOUCH_PIN, OVERSAMPLE_4, RESISTOR_50K, FREQ_MODE_NONE);

//TBlendType    currentBlending;

//CRGBPalette16 currentPalette;

void setup() {

  Serial.begin(115200);

  if (! qt_1.begin())  

   Serial.println(“Failed to begin qt on pin A1”);

   //FastLED.addLeds<WS2812, NEOPIXEL_PIN, COLOR_ORDER>(leds, NUM_LEDS);  // Set up neopixels with FastLED

   //FastLED.setBrightness(BRIGHTNESS); // set global brightness

   //FastLED.setMaxPowerInVoltsAndMilliamps(3,350);  //Constrain FastLED’s power usage

    strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)

  strip.show();            // Turn OFF all pixels ASAP

  strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)

}

void loop() {

  Serial.print(qt_1.measure());

  Serial.write(‘ ‘);

  checkpress();   //check to see if the button’s been pressed

  //delay(20);

}

void checkpress() {

// Get current button state.

    long newState =  qt_1.measure();  

    Serial.println(qt_1.measure());

   if (newState > touch && oldState < touch) {

    // Short delay to debounce button.

    delay(500);

    // Check if button is still low after debounce.

    long newState =  qt_1.measure(); }

  if (newState > touch ) {  

  colorWipe(strip.Color(0,   0,   0,255)     , 50); // white

    }

    else{

        colorWipe(strip.Color(0,   0,   255, 0) , 2); // off

    }

  // Set the last button state to the old state.

  oldState = newState;

void colorWipe(uint32_t color, int wait) {

  for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip…

    strip.setPixelColor(i, color);         //  Set pixel’s color (in RAM)

    strip.show();                          //  Update strip to match

    delay(wait);                           //  Pause for a moment

  }

}

Reflection

The whole parade I really get fun. And this is my first time to participate in Halloween parade, and I never dress up and make up for Halloween. It was really worth to make a lot of effort in preparing this event. Actually,I bought the custom before I figured out what exactly I want to do. Due to this custom, I decided to do a wand to match my custom. And it was successful in the end because at my first time I didn’t know if I can make it or not. I used a free touch to change the color of light inside of crystal ball. In the beginning, it was hard to find the use of the paper for making a wand look like hardness. Finally, I got masking tape to wind-up the wood. And I found the way to hide the circuit and the light which inside of crystal ball. The really tricky one was hiding switch because I pierced a hole to let me turn on or off. But even I can not find this hole quickly turn on or off the light. Also, the whole process is not easy; everyone gets fun in the parade.

Leave a Reply