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

DIY Neon Mood Lamp

Make your own neon mood lamp, follow this easy tutorial. Feel free to download the 3d print file in the youtube description.

IntermediateFull instructions provided240
DIY Neon Mood Lamp

Things used in this project

Hardware components

Arduino Nano
×1
LED (generic)
LED (generic)
×3
Resistor 330 ohm
Resistor 330 ohm
×14
Male/Male Jumper Wires
×8
Switch Sealing Boot, Button Operators
Switch Sealing Boot, Button Operators
×1

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Hot glue gun (generic)
Hot glue gun (generic)
Helping Hand Tool, with Magnifying Glass
Helping Hand Tool, with Magnifying Glass

Story

Read more

Schematics

Schematics for Ambient Lamp

Schematic plan showing how the leds, button and other components are connected to the arduino.

Schematics for Neon Lamp

Connection Plan for Reference

Code

Code for DIY Ambient Lamp

Arduino
int count=0;
int newcount;
void setup()


{
Serial.begin(9600);
pinMode(2,INPUT); //push button
pinMode(13,OUTPUT); //red led
pinMode(6,OUTPUT); //blue led
pinMode(12,OUTPUT); // green led

}
void loop()
{

  if(digitalRead(2)==HIGH)
  {
  newcount=count+1;
    if(newcount!=count)
      {
      Serial.println(newcount);
      switch (newcount)
      {
        case 1: digitalWrite(13,HIGH);   
                break;                   


        case 2: digitalWrite(13,LOW);    
                break;

                
        case 3: digitalWrite(6,HIGH);
                break;

        case 4: digitalWrite(6,LOW);
                break;
                
        case 5: digitalWrite(12,HIGH);
                break;

        case 6: digitalWrite(13, HIGH);
                digitalWrite(6, HIGH);
                digitalWrite(12, HIGH);
                break;
        

       

        default: digitalWrite(13,LOW);
                 digitalWrite(6,LOW);
                 digitalWrite(12,LOW);

                 newcount=0;
                 break;
       }
    count=newcount;
    }
}
delay(130);
}

Credits

Comments