
I am making “Appa” the character as a coat. I want my costume to be cozy and comfortable and I kind of want to project that feeling to others through my costume.



The Idea


Instead of the arrow and the other details on it’s back being dark brown, I want them to light up.
I also want the details to light up in a kind of “ombre” way. I’m not sure how to explain it but look under settings (3).
Arduino Techniques
For the Arduino techniques I want to have 3 light settings:
- Light turned off
- Light turned on
- Ombre Light (Only white)
For light setting 3, I need to find a way to make them blink in a row, I know this is possible because the NeoPixel LED stick did that in the last Arduino Exercise.
I want to have a button in the hood or in the sleeve that allows me to change the light setting. I only want to have one button so I’m thinking of having it that if I press it once it turns on and if I press it again it goes ombre and if I press it then again it turns off.
Circuit diagram
Materials
- White/Cream Faux Fur (similar to Faux Fur from Mood Fabrics)
- Black Rib Knit from Mood Fabrics
- Adafruit Gemma M0
- Button
- Wire (To connect button to led lights)
- RGB Light Strip 47 inches (back) + 40 inches hoodie + 5*6 inches for detail + some inches for arrow RGB LED Strip
- A hoodie that I like the form of so I can use it as a pattern Hoodie from Aritzia (used this one)
- Charging Bank
- Tools: Scissors, Pen, Soldering Device, Solder, needle, thread, sewing machine.
Progress
I started tracing a hoodie that I liked the shape of.



Next I traced the shapes to the faux fur fabric.

I didn’t have enough fabric so I had to make one sleeve out of 2 parts instead of one, but it turned out alright.



I pinned my pieces and sewed them together. The most challenging stuff was sewing the sleeves to the body😅. I also added the ribbed jersey material to the bottom of the jacket. That made the jacket look really nice and fitted.

I ran out of the ribbed material, so I had to head to the fabric store to buy more. I also bought a zipper, but when I examined it closer, I found out that I couldn’t zip it all the way down :/
I sewed the ripped material to the sleeves, I had to do it twice because the first time I sewed it, I turned it the wrong way.



LED lightning
I was kind of unsure how to make the arrow so I had to draw them up a few times. I ended on choosing this design.

I drew the circuit in Tinkercad to check if it worked and got confirmation from Becky.
I’m not gonna lie, this was very challenging for me because I wasn’t sure what the best way was to make these connections.
I started setting up my lights and then I tried connecting the wires to them. My soldering wasn’t the best so I had to redo it because the wires were to close to each other.






I decided to try another method where I make a “Y” out of the wire. This minimizes the risk of the wires connecting. That did not go so well so I tried a new method.






I taped down the LED lights to my desired shape with electric tape. After that, I soldered together 3 wires and connected them to the LED lights. This ended up working very well and I put electric tape over my connections to make them extra stable.



I soldered my arrow to a long strip and to the Gemma M0. Before I added the button I checked if my LED strip worked which it did!



I soldered the button to long wires soldered to the Gemma M0. When I finished soldering all the parts I secured the connections with electric tape and sewed the lights to the coat.
I found out that the button wasn’t working because I connected it wrong. The right way to connect it is diagonally. When I fixed that everything started to work.
Coding

Getting the code to work
I started by using the code from our past assignments and changed it a bit. I first noticed that the code wasn’t properly working for my LED lights. The problem was that the LED lights only read GRB values but not the RGBW. I’m not sure why that was but when I changed it to NEO_GRB the lights worked flawlessly.
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);
Creating the functions for my light show
The second thing I changed was the rainbowOverWhite class. I wanted it to be black over white. So I made a new function called “blackOverWhite” where the color black is (0,0,0) and white is (255, 255, 255).
void blackOverWhite(uint8_t wait, uint8_t whiteSpeed, uint8_t whiteLength ) {
if(whiteLength >= strip.numPixels()) whiteLength = strip.numPixels() - 1;
int head = whiteLength - 1;
int tail = 0;
int loops = 3;
int loopNum = 0;
static unsigned long lastTime = 0;
while(true){
for(int j=0; j<256; j++) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
if((i >= tail && i <= head) || (tail > head && i >= tail) || (tail > head && i <= head) ){
strip.setPixelColor(i, strip.Color(0, 0, 0 ) );
}
else{
strip.setPixelColor(i, strip.Color(255, 255, 255 ) );
}
}
if(millis() - lastTime > whiteSpeed) {
head++;
tail++;
if(head == strip.numPixels()){
loopNum++;
}
lastTime = millis();
}
if(loopNum == loops) return;
head%=strip.numPixels();
tail%=strip.numPixels();
strip.show();
delay(wait);
}
}
}
Coding the button
First I had to tell Arduino that my button was connected to pin 2. I did that by writing:
#define BUTTON 2
Next, I had to define what state the button was in because I wanted the button to change after what state it was in. Then I had to define what the last state of the button was, which is High. The button has 2 states, high and low, which kind of means on and off. Next, I defined the counter because I want the counter to go up if the button is pressed. Then I had to apply debounce so it switches when only the button is pressed. Here are the 2 websites I used to help me code the button. https://docs.arduino.cc/built-in-examples/digital/Debounce/, https://docs.arduino.cc/built-in-examples/digital/Button/.
// Check if button state has changed and apply debounce
if (reading == LOW && lastButtonState == HIGH && (millis() - time) > debounce) {
counter++; // Increment counter to change LED mode
time = millis(); // Update last debounce time
}
This is checking if the button has been pressed and it is not a mistake (removing noise) Read about Debouncing.
Here is my full code.
#include <Adafruit_NeoPixel.h>
#define PIN 1
#define NUM_LEDS 53
#define BRIGHTNESS 50
#define BUTTON 2 // Button connected to pin 2
int buttonState = 0; // Current button state
int lastButtonState = HIGH; // Previous button state
int counter = 0;
long time = 0; // The Debounce time
long debounce = 200; // Debounce delay in milliseconds
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.setBrightness(BRIGHTNESS);
strip.begin();
strip.show();
pinMode(BUTTON, INPUT_PULLUP);
}
void loop() {
// What state the Button is in (HIGH or LOW)/(ON or OFF)
int reading = digitalRead(BUTTON);
// Check if button state has changed and apply debounce
if (reading == LOW && lastButtonState == HIGH && (millis() - time) > debounce) {
counter++; // The counter changes
time = millis(); // Update last debounce time
}
lastButtonState = reading;
// Cycle through LED modes based on counter
if (counter == 0) {
colorWipe(strip.Color(255, 255, 255), 50); // White
} else if (counter == 1) {
blackOverWhite(20, 70, 5);
} else if (counter == 2) {
colorWipe(strip.Color(0, 0, 0), 50); // Off
} else {
counter = 0; // Reset counter to cycle through modes
}
}
// Fill the LEDs one after the other with a specified color
void colorWipe(uint32_t c, uint8_t wait) {
for (uint16_t i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}
// Non-blocking version of blackOverWhite animation
void blackOverWhite(uint8_t wait, uint8_t whiteSpeed, uint8_t whiteLength) {
static int head = 0;
static int tail = -whiteLength;
static int loopNum = 0;
static unsigned long lastTime = 0;
if (whiteLength >= strip.numPixels()) whiteLength = strip.numPixels() - 1;
// Only update the animation if enough time has passed
if (millis() - lastTime > whiteSpeed) {
for (uint16_t i = 0; i < strip.numPixels(); i++) {
if ((i >= tail && i <= head) || (tail > head && i >= tail) || (tail > head && i <= head)) {
strip.setPixelColor(i, strip.Color(255, 255, 255)); // White
} else {
strip.setPixelColor(i, strip.Color(50, 50, 50)); // Dim white
}
}
head++;
tail++;
if (head == strip.numPixels()) {
head = 0;
tail = -whiteLength;
loopNum++;
}
if (loopNum >= 3) {
loopNum = 0;
return;
}
lastTime = millis();
strip.show();
delay(wait);
}
}
Final Thoughts
I’m very happy with the outcome, however I wish to sew a zipper to the costume. If I had extra time I would sew material inside of the coat so the you can’t feel the LED strip. I was kind of stressed about ripping the wiring.


You love sheep, this is so cute! I think sewing the lights to the cloth would help secure it. Maybe the light can have different blink patterns controlled by a switch.