Saturday, September 20, 2014

Arduino Himalayan Salt Candle

Himalayan Salt Lights are really cool looking translucent salt "Rocks". With a lightbulb inside, not only are they a soothing warm light, but they are supposed to give off Negative Ions that leave you refreshed. I have added a Arduino and  SSR to give my light a flickering candle look, which makes it a very interesting conversation piece.

Video, code, and parts list below!


Parts:

Arduino UNO
Solid State Relay (SSR)
Himalayan Salt Light

Code:


int lightPin = 9;   
int randNumber;

void setup()  { 
  randomSeed(analogRead(0));
  pinMode(lightPin, OUTPUT);  

void loop()  { 
    randNumber = random(50, 254);
    analogWrite(lightPin, randNumber);   
    delay(randNumber*3);     
  } 


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...