Code Monkey home page Code Monkey logo

attiny85-20-led-snowflakes's Introduction

ATtiny85 "Snow" with 20 Charlieplexed LEDs

ATtiny85 Xmas decorative effect, using Arduino core

This project creates a falling snowflake effect (or rain?) as discussed in this Arduino forum thread: http://arduino.cc/forum/index.php/topic,135596.15.html

The animation has a bright LED at the head, and a tail of 4 others which fall at a slightly randomised speed, with a random delay between falls. The animation slows during the fall, and the "snowflake" rests at the bottom while the tail collapses into it, before finally fading away.

Operation

Animation operates while powered on.

ATtiny85 pin assignments

(legs numbered 1..8 counterclockwise from leg marked with dot)

  1. Reset, no connection
  2. D3 GREEN channel
  3. D4 ORANGE channel
  4. GND
  5. D0 WHITE channel
  6. D1 BLUE channel
  7. D2 YELLOW channel
  8. +5V

Code

Written using the Arduino IDE and Arduino-Tiny cores (http://code.google.com/p/arduino-tiny/); the target to select is the ATtiny85 @ 8MHz (internal oscillator, BOD disabled). Look up how to program the ATtiny using Arduino, and programming it using Arduino as an IDE.

Tested installation

For simplicity of wiring on breadboard, and for matching to function in the code, this was wired using a colour code. A breadboard circuit diagram created in Fritzing is included to explain how two of those channels are wired.

I started the breadboard with a row of 20 LEDs, each with the flat side to the right. For a more permanent installation, rotating the LEDs so the flat side is top or bottom would allow for ease of wiring. Each group of 4 LEDs shares a direct connection to one pin directly without a resistor, with the 4 anodes (+, or the long LED leg) linked. Then the other legs are connected via a current limiting resistor to the other colours in the sequence green, orange, white, blue, yellow (always in this order, but omitting of course the colour that the anodes are).

So the green group has green to the anodes, then the cathodes in left to right sequence are orange, white, blue & yellow. The orange group has orange to the anodes, with green, white, blue & yellow to the cathodes left to right. White group's cathodes are sequenced green, orange, blue & yellow; the blue group's cathodes go green, orange, white & yellow; and the yellow group's cathodes go green, orange, white & blue.

BoM as tested:

1x ATtiny85-20PU
20x 5mm blue LED
5x 100 Ohm resistors (current limiting, for LEDs)
1x 0.1uF ceramic capacitor (decoupling)
lots of interconnecting wire!

Be sure to choose current limiting resistors to suit the particular LED you select.

Enjoy : )

attiny85-20-led-snowflakes's People

Contributors

strykeroz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.