GithubHelp home page GithubHelp logo

amicoleo / arduinolightanimation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fabricacode/arduinolightanimation

0.0 2.0 0.0 244 KB

CSS3 style color animation library for controlling RGB leds on Arduino

arduinolightanimation's Introduction

arduinoLightAnimation

CSS3 style color animation library for controlling RGB leds on Arduino https://vimeo.com/79962595 For information on how to install a library for the Arduino IDE check here: http://arduino.cc/en/Guide/Libraries

aLA (arduino Light Animation) / CSS3 animation comparison

  • animation-duration

    • CSS3: Specifies how many seconds or milliseconds an animation takes to complete one cycle. Default 0.
    • aLA: Specifies how many milliseconds an animation takes to complete one cycle. Default 1000ms.
      • can be set either when the animation is set:

         myAnimator.setAnimation(animationKeyFrameArray, nKeyFrames, duration_ms); 
        
      • or BEFORE to set the animation:

         myAnimator.setDuration(duration_ms);
         myAnimator.setAnimation(animationKeyFrameArray, nKeyFrames); 
        
  • animation-timing-function

    • CSS3: Describes how the animation will progress over one cycle of its duration. Default "ease"
    • aLA: Now only linear
  • animation-delay

    • CSS3: Specifies when the animation will start. Default 0
    • aLA: Start to update after a delay will suffice.
  • animation-iteration-count

    • CSS3: Specifies the number of times an animation is played. Default 1
    • aLA: Specifies the number of times an animation is played. Default infinite;
      • in setup, for setting number of iterations

         myAnimator.setIterations(nIterations); 
        
      • for setting infinite iterations

         myAnimator.setIterationsInfinite(true); 
        
      • or restore past number of iterations

         myAnimator.setIterationsInfinite(false); 
        
  • animation-direction

    • CSS3: Specifies whether or not the animation should play in reverse on alternate cycles. Default "normal" http://www.w3schools.com/cssref/css3_pr_animation-direction.asp
    • aLA: Specifies if the animation is played always from begin to end "normal" or alternately from begin to end, then from end to begin "alternate". Default is "normal".
      • in setup, for setting the "alternate" mode.

         myAnimator.setAlternate(true); 
        
      • "normal" mode

         myAnimator.setAlternate(false); 
        
  • animation-play-state

    • CSS3: Specifies whether the animation is running or paused. Default "running"
    • aLA: Not updating works as a pause.

Other features and info

  • Order for setting animation keyframe is not relevant

  • Transition when animation are changed on runtime

    • Set time of trasition between different animations
     myAnimator.setTransitionDuration(unsigned long _transitionDuration)
    
  • Can put colors in rgb, hex, hsb

  • Putting "delay" function will interfere with the timing of the animation, since the update function is supposed to be executed each cycle.

=====================

Check the Examples for an idea of how to use the library

arduinolightanimation's People

Contributors

amicoleo avatar

Watchers

 avatar  avatar

arduinolightanimation's Issues

Add white calibration

Function that allows to set a value reference for white (defined empirically by looking at the light) that scale all the other r, g, b values accordingly.

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.