Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Arnov Sharma
Published

HALO Energy Sword

Made a life size Energy Sword from Halo Franchise, Attiny85 is being used here to drive WS2812 LEDs that illuminate the Blades.

BeginnerFull instructions provided1 hour279

Things used in this project

Story

Read more

Custom parts and enclosures

Fusion360File

Schematics

POWER MODULE

ATTINY85 Board

LED BOARD

Code

code

C/C++
#include <Adafruit_NeoPixel.h>

#define LED_PIN 3
#define LED_COUNT 20

Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();
}

void loop() {
  for (int i = 0; i < 256; i++) {
    for (int j = 0; j < strip.numPixels(); j++) {
      int blue = 255 - i;
      int red = i;
      int green = 0;
      strip.setPixelColor(j, strip.Color(red, green, blue));
    }
    strip.show();
    delay(10);
  }

  for (int i = 255; i >= 0; i--) {
    for (int j = 0; j < strip.numPixels(); j++) {
      int blue = 255 - i;
      int red = i;
      int green = 0;
      strip.setPixelColor(j, strip.Color(red, green, blue));
    }
    strip.show();
    delay(10);
  }
}

Credits

Arnov Sharma
319 projects • 322 followers
Just your average MAKER
Contact

Comments

Please log in or sign up to comment.