Giter Site home page Giter Site logo

arduino-particle-sys's Introduction

About

A particle system library for arduino for arbitrary matrix sizes Based on code by Gilad Dayagi ( https://github.com/giladaya/arduino-particle-sys ) Mainly intended to be used with low-resolution displays (like an 8x8 RGB matrix).

Installation

Clone the repo into the arduino libraries directory

Dependencies

The FastLEDRenderer.cpp and .h depend on the FastLED library ( http://fastled.io )

RAM Usage

This version of the Particle System can be used for an arbitrary size of matrix (up to 256x256 Pixels) The particle coordinates and other values use 16-bit integers to hold the relevant values. If you have a LED Matrix of 8x8 Pixels or smaller on hardware with limited RAM (i.E. atmega328 with 2kb of RAM), I recommend to use the original Particle System: https://github.com/giladaya/arduino-particle-sys

Hardware

Any Arduino compatible hardware, but due to RAM usage I recommend something beefy, like a teensy ( http://pjrc.com/teensy/ )

Examples

The following examples are included in the library:

Notes

If you are working with a narrow LED Matrix (for example 8 x 32 pixels), the Particle_Attractor tends to suck the source right in his center. This can be corrected using one of several ways:

  1. use a higher res_y in the ParticleSysConfig class (in the above example use res_x = 32 (default) and res_y = 128 (4 x default)). The particle system then is calculated as a square, but painted in a squished form.
  2. lower the attractor force of the Particle_Attractor (atf - property, the default value is 4)
  3. change the attractor force constantly in the loop, for example: ( source.atf = map(beatsin8(50),0,255,-2,3); // this varies the attractor force between -2 (pushing away) and 3 (attracting) 50 times per minute - see FastLED library for the use of the beatsin8 function...)

I used the first approach in the right side of this video: https://youtu.be/osnOcP0NfYc

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.