Giter Site home page Giter Site logo

brooksware2000 / halloweenfire Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danesparza/halloweenfire

0.0 2.0 0.0 6 KB

Arduino sketch for multiple neopixels to create spooky 'fire' effect :jack_o_lantern:

License: MIT License

Arduino 100.00%

halloweenfire's Introduction

Halloweenfire

Arduino sketch for multiple NeoPixels to create spooky 'fire' effect

I have tested this with an Adafruit Metro Mini 5v and an Adafruit Pro Trinket 3v successfully. You'll also need to get your hands on some NeoPixels and the NeoPixel library.

I recommending powering this with a USB battery charger.

Remember to indicate what pin you're using and how many NeoPixel LED's are in your chain:

#define PIN 6

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(4, PIN, NEO_GRB + NEO_KHZ800);

You can also adjust some parameters of the sketch to easily tweak the fire effect. Here, we are using an orange flame effect by default:

RGB flameColors[] = {
  { 226, 121, 35},  // Orange flame
  { 158, 8, 148},   // Purple flame 
  { 74, 150, 12},   // Green flame
  { 226, 15, 30}    // Red flame
  };

I also recently tweaked this sketch to make use of a momentary push button. Pushing the button will cycle to the next item in the color array (effectively changing the color):

//  The button pin
const int buttonPin = 2;

halloweenfire's People

Contributors

danesparza avatar

Watchers

Curtis Brooks avatar James Cloos 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.