spittorbone
Published © CC BY-NC

Helix RGB Lamp

Switching RGB LED Lamp

BeginnerShowcase (no instructions)439
Helix RGB Lamp

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
I have a clone but that doesen't bothers
×1
Jumper wires (generic)
Jumper wires (generic)
×5
Custom PCB
Custom PCB
Made my own diagram
×1
RGB Diffused Common Anode
RGB Diffused Common Anode
×3
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1
Resistor 221 ohm
Resistor 221 ohm
×9
Solderless Breadboard Half Size
Solderless Breadboard Half Size
I used a 170Pin
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Solder Flux, Soldering
Solder Flux, Soldering
3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

The Helix Sculpture

The top helix sculpture creators site

THe Stand

THe base where all the components are stored

Schematics

PCB

My custom PCB circuite diagram

Code

Code

Arduino
Wanted to change color each LED individually simultaneously.
#define RED_PIN 11      // where the red pin is connected to
#define GREEN_PIN 10   // where the green pin is connected to
#define BLUE_PIN 9    // where the blue pin is connected to
#define RED2_PIN 8      // where the red pin is connected to
#define GREEN2_PIN 7   // where the green pin is connected to
#define BLUE2_PIN 6    // where the blue pin is connected to
#define RED3_PIN 5      // where the red pin is connected to
#define GREEN3_PIN 4   // where the green pin is connected to
#define BLUE3_PIN 3    // where the blue pin is connected to
#define DELAY 10       // 10ms internal delay; increase for slower fades

void setup() {
  pinMode(GREEN_PIN, OUTPUT);
  pinMode(BLUE_PIN, OUTPUT);
  pinMode(RED_PIN, OUTPUT);
  pinMode(GREEN2_PIN, OUTPUT);
  pinMode(BLUE2_PIN, OUTPUT);
  pinMode(RED2_PIN, OUTPUT);
  pinMode(GREEN3_PIN, OUTPUT);
  pinMode(BLUE3_PIN, OUTPUT);
  pinMode(RED3_PIN, OUTPUT);
}

void loop() {
  // fade from green to red
  for(int i=0; i<255; i++) {
    analogWrite(RED_PIN, i);analogWrite(RED2_PIN, 0);analogWrite(RED3_PIN, 255-i);
    analogWrite(GREEN_PIN, 255-i);analogWrite(GREEN2_PIN, i);analogWrite(GREEN3_PIN, 0);
    analogWrite(BLUE_PIN, 0);analogWrite(BLUE2_PIN, 255-i);analogWrite(BLUE3_PIN, i);
    delay(DELAY);
  }

  // fade from red to blue
  for(int i=0; i<255; i++) {
    analogWrite(RED_PIN, 255-i);analogWrite(RED2_PIN, i);analogWrite(RED3_PIN, 0);
    analogWrite(GREEN_PIN, 0);analogWrite(GREEN2_PIN, 255-i);analogWrite(GREEN3_PIN, i);
    analogWrite(BLUE_PIN, i);analogWrite(BLUE2_PIN, 0);analogWrite(BLUE3_PIN, 255-i);
    delay(DELAY);
  }

  // fade from blue to green
  for(int i=0; i<255; i++) {
    analogWrite(RED_PIN, 0);analogWrite(RED2_PIN, 255-i);analogWrite(RED3_PIN, i);
    analogWrite(GREEN_PIN, i);analogWrite(GREEN2_PIN, 0);analogWrite(GREEN3_PIN, 255-i);
    analogWrite(BLUE_PIN, 255-i);analogWrite(BLUE2_PIN, i);analogWrite(BLUE3_PIN, 0);
    delay(DELAY);
  }
}

Credits

spittorbone
1 project • 0 followers
Contact

Comments

Please log in or sign up to comment.