Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Arnov Sharma
Published © GPL3+

DIY HexaLeaf with Attiny85

HexaLeaf Setup made from combining 6 Custom WS2812B PCB together

BeginnerFull instructions provided2 hours3,346

Things used in this project

Hardware components

JLCPCB Customized PCB
JLCPCB Customized PCB
×6
ATtiny85
Microchip ATtiny85
×1
ws2812B LED
×36
Arduino Nano R3
Arduino Nano R3
for Attiny85 Programming
×1

Software apps and online services

Fusion
Autodesk Fusion
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Hot Plate, 800 W
Hot Plate, 800 W
Solder Paste, Silver Bearing
Solder Paste, Silver Bearing

Story

Read more

Custom parts and enclosures

jig

Schematics

sch

Code

Rainbow

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

#define PIXEL_PIN    0  

#define PIXEL_COUNT 36 

Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, NEO_GRB + NEO_KHZ800);


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

void loop() {
rainbow(20);
}



void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}

Credits

Arnov Sharma

Arnov Sharma

310 projects • 311 followers
Just your average MAKER

Comments