Arnov Sharma
Published © LGPL

Tulipa x RGB Edition

Made a 3D Printed Attiny85 Powered RGB TULIP as a Decoration item for my living room.

BeginnerFull instructions provided4 hours451

Things used in this project

Hardware components

Adafruit WS2812B LEDs
×49
ATtiny85
Microchip ATtiny85
×1
PCBWay Custom PCB
PCBWay Custom PCB
×49
Arduino Nano R3
Arduino Nano R3
×1

Software apps and online services

Fusion 360
Autodesk Fusion 360

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Stalk Cover

cad file

Leaf base

Leaf Top

Petal Base

Petal Cover

Stalk Base

Schematics

Main Wiring

sch for pcb

Multiple PIXIE Board Connections

Code

code

C/C++
#include <Adafruit_NeoPixel.h>
#define PIN1 0  //connect D0 
#define PIN2 1  //connect D1 

#define NUMPIXELS1 23
#define NUMPIXELS2 26

Adafruit_NeoPixel pixels1 = Adafruit_NeoPixel(NUMPIXELS1, PIN1, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel pixels2 = Adafruit_NeoPixel(NUMPIXELS2, PIN2, NEO_GRB + NEO_KHZ800);

int delayval = 10; // timing delay
int redColor = 0;
int greenColor = 0;
int blueColor = 0;


void setup()  {
  pixels1.begin();
  pixels2.begin();

  pixels1.show();
  pixels2.show();

}

void loop() {

  ring1();
  ring2();
  delay(500);

}

void ring1() {
  setColor();

  for(int i=0;i<NUMPIXELS1;i++){

    // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
    pixels1.setPixelColor(i, pixels1.Color(redColor, 0, blueColor)); // Moderately bright green color.

    pixels1.show(); // This sends the updated pixel color to the hardware.

    delay(delayval); // Delay for a period of time (in milliseconds).
    
    // Serial.println(i);
    
    if (i == NUMPIXELS1){
      i = 0; // start all over again!
        setColor();
    }

  }
}
  
void ring2() {
  setColor();

  for(int i=0;i<NUMPIXELS2;i++){

    // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
    pixels2.setPixelColor(i, pixels2.Color(0, 255, 10)); // Moderately bright green color.

    pixels2.show(); // This sends the updated pixel color to the hardware.

    delay(delayval); // Delay for a period of time (in milliseconds).
    
    // Serial.println(i);
    
    if (i == NUMPIXELS2){
      i = 0; // start all over again!
        setColor();
    }

  }
}


void setColor(){
  redColor = random(0, 255);
  greenColor = random(0,255);
  blueColor = random(0, 255);
  Serial.print("red: ");
  Serial.println(redColor);
  Serial.print("green: ");
  Serial.println(greenColor);
  Serial.print("blue: ");
  Serial.println(blueColor);
  
}

Credits

Arnov Sharma

Arnov Sharma

266 projects • 272 followers
Just your average MAKER

Comments