Tealight 2

by Member #523727

Favorited Favorite 0

this is an idea for a better tealight. My goal is to fit the entire thing in a 1" cylinder with a thickness, excluding protruding LED, of 1/2". I don't know if I can fit everything on the board, but if I can I'll draw up custom boards.

Flicker code for anyone who can get it to work. /* FlickerFlame Swift 05-27-14 I started with the Blink example and added a simple random number generator. */

//use these values to tweak the effect to your liking. int ledpin = 1; //pin for the LED int intensity = 250; //this is the current intensity for the LED int Die; //juse a temporary place to store a value int FlickerAmount = 50; //this controls the size of the flicker.

// the setup routine runs once when you press reset: void setup() {
// initialize the digital pin as an output. pinMode(ledpin, OUTPUT); randomSeed(analogRead(0));
}

// the loop routine runs over and over again forever: void loop() { Die = random(1,3); //roll a D3 if (Die == 1) intensity-=FlickerAmount; //on a 1 it gets dimmer if (Die == 2) intensity+=FlickerAmount; //on a 2 it gets brighter //on a 3 it does not change if (intensity > 250) intensity = 250; //flame has a max value if (intensity < 50) intensity = 50; //flame has a min value

analogWrite(ledpin,intensity); //output delay(100); //this determines the frequency of the flicker. }

Share this Wish List!

Link. You can share this list with the following link – just copy and paste:

Embed: Want to embed this wish list in an HTML page? Just copy and paste the following script tag:

Data: Just want a file you can save or pass around? We've got you covered. Click for CSV or JSON.

Product Subtotal Qty
AVR 8 Pin 20MHz 8K 4A/D - ATtiny85
In stock COM-09378
3.5 1   
SPDT Slide Switch
In stock COM-09609
0.95 1   
Super Bright LED - Yellow 10mm
Out of stock COM-11119
1.85 1   
Cannot be ordered at this time.
DIP Sockets Solder Tail - 8-Pin
In stock PRT-07937
0.55 1   
ProtoBoard - Round 1"
Retired PRT-08809
2.95 1   
Cannot be ordered at this time.
Coin Cell Battery Holder - 12mm (PTH)
Out of stock PRT-07948
4.8 3   
Button Cell Battery - 11.6mm (LR44)
In stock PRT-11305
2.85 3   
Total: 17.45