Git Product home page Git Product logo

kaleidoscope-ledeffect-rainbow's Introduction

Kaleidoscope-LEDEffect-Rainbow

Build Status

Two colorful rainbow effects are implemented by this plugin: one where the rainbow waves through the keys, and another where the LEDs breathe though the colors of a rainbow. The difference is that in the first case, we have all the rainbow colors on display, and it waves through the keyboard. In the second case, we have only one color at a time, for the whole board, and the color cycles through the rainbow's palette.

Using the extension

To use the plugin, include the header, and tell the firmware to use either (or both!) of the effects:

#include <Kaleidoscope-LEDControl.h>
#include <Kaleidoscope-LEDEffect-Rainbow.h>

KALEIDOSCOPE_INIT_PLUGINS(LEDRainbowEffect, LEDRainbowWaveEffect);

void setup() {
  Kaleidoscope.setup();

  LEDRainbowEffect.brightness(150);
  LEDRainbowWaveEffect.brightness(150);
  LEDRainbowWaveEffect.update_delay(50);
}

Plugin methods

The plugin provides two objects: LEDRainbowEffect, and LEDRainbowWaveEffect, both of which provide the following methods:

.brightness([brightness])

Sets (or gets, if called without an argument) the LED brightness for the effect.

Defaults to 50.

.update_delay([delay])

Sets (or gets, if called without an argument) the number of milliseconds between effect updates. Smaller number results in faster rainbows.

Defaults to 40.

Dependencies

kaleidoscope-ledeffect-rainbow's People

Contributors

algernon avatar ninjaaron avatar obra avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kaleidoscope-ledeffect-rainbow's Issues

change brightness of rainbow with LED key

Sorry if I'm missing something, but I don't currently see a way to change LED brightness of Rainbow mode without recompiling and flashing. It would be awesome to be able to toggle between settings with the LED key (or some other way) to change brightness throughout the day.

Animation speed depends on cycle speed

The Rainbow effects currently update the animation depending on cycle ticks (amount of main loop cycles since the last update), which means that the faster the main loop, the faster the animation gets. Or if the main loop is slow, the animation will slow down as well. This can result in far too fast animations, instead of a reliable, nicely timed one.

We should switch to using timers, like most other effects do, for the sake of consistency, and nicer, smoother animations regardless of cycle speed.

Rapid color cycling and breathing

At some point in the past couple days, after reflashing the firmware to adjust the key maps, this effect started cycling through the colors and breathing very quickly. It's easily double or triple time compared to the previous speed. I tried rolling back a couple firmware versions—nothing systematic like a bisect—but it didn't help. Any thoughts or pointers?

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.