# New plugin: Digital Rain (The Matrix falling code effect)

**URL:** <https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671>\
**Category:** Plugins\
**Created:** [November 3, 2017, 7:36am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671 "2017-11-03T07:36:59Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![bjn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bjn/32/5337_2.png) [@bjn](https://community.keyboard.io/u/bjn)\
**Post date:** [November 10, 2017, 7:11pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/21 "2017-11-10T19:11:22Z")

</div>

> [@ejinks4](#):
>
> One thing I noticed is that the class is actually called `LEDDigitalRainEffect` not `LEDDigitalRain` as is indicated in some of the documentation.

Someone (you?) gave a pull request for that which I merged today. Thanks either way!

---

<div class="post-metadata">

**Author:** ![bjn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bjn/32/5337_2.png) [@bjn](https://community.keyboard.io/u/bjn)\
**Post date:** [November 10, 2017, 7:12pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/22 "2017-11-10T19:12:34Z")

</div>

I just pushed v0.2.0, in which you can set `COLOR_CHANNEL` to 0 or 2 rather than the default 1, for red or blue. Eventually I’ll spend the time to allow arbitrary colours.

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [November 10, 2017, 7:39pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/23 "2017-11-10T19:39:50Z")

</div>

> [@bjn](#):
>
> I just pushed v0.2.0, in which you can set COLOR\_CHANNEL to 0 or 2 rather than the default 1, for red or blue. Eventually I’ll spend the time to allow arbitrary colours.

ahh… is it this?

```auto
	cRGB LEDDigitalRainEffect::getColorFromComponents(uint8_t primary, uint8_t secondary) {
		switch (COLOR_CHANNEL) {
			case 0: return CRGB(primary, secondary, secondary);
			case 1: return CRGB(secondary, primary, secondary);
			case 2: return CRGB(secondary, secondary, primary);
			default: return CRGB(0, 0, 0);

```

thanks, gonna try it now.

---

<div class="post-metadata">

**Author:** ![bjn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bjn/32/5337_2.png) [@bjn](https://community.keyboard.io/u/bjn)\
**Post date:** [November 10, 2017, 7:53pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/24 "2017-11-10T19:53:49Z")

</div>

That and a bit more, yeah. [Full relevant changeset](https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain/commit/f156adfc9227bf645725ed85d134094c64ca2f0e)

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [November 10, 2017, 7:56pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/25 "2017-11-10T19:56:50Z")

</div>

looks good, I’ll have to try it at night so I can really see the difference(s).

---

<div class="post-metadata">

**Author:** ![joe654](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@joe654](https://community.keyboard.io/u/joe654)\
**Post date:** [April 9, 2019, 8:22am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/26 "2019-04-09T08:22:11Z")

</div>

really awesome that one

---

<div class="post-metadata">

**Author:** ![\_rkstar](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/_rkstar/32/539_2.png) [@\_rkstar](https://community.keyboard.io/u/_rkstar)\
**Post date:** [March 16, 2020, 10:46pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/27 "2020-03-16T22:46:49Z")

</div>

How do I get this loaded using chrysalis?

---

<div class="post-metadata">

**Author:** ![bjn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bjn/32/5337_2.png) [@bjn](https://community.keyboard.io/u/bjn)\
**Post date:** [March 16, 2020, 10:59pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/28 "2020-03-16T22:59:48Z")

</div>

I’ve honestly no idea, but if you sit tight there’s a chance this plugin will be part of core Kaleidoscope soon anyway – see [https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain/issues/12](https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain/issues/12)

Cc @algernon

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [March 27, 2020, 11:42pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/29 "2020-03-27T23:42:26Z")

</div>

Hola Bart and Gergerly,

I saw you guys working on this over on Git. Do you guys have a time frame of completion on this project? Not nagging, just asking as I can’t get Digital Rain to work on keyboardio 1.96.0, it works on my old machine 1.22. I did manage to get christmas lights to work so I have no complaints.

I tried compiling the sketch but I keep getting different errors (once I fix the first error, then next, etc.) until I got to one that I couldn’t figure out.

Thank you for your contributions.

---

<div class="post-metadata">

**Author:** ![bjn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bjn/32/5337_2.png) [@bjn](https://community.keyboard.io/u/bjn)\
**Post date:** [March 28, 2020, 12:02am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/30 "2020-03-28T00:02:40Z")

</div>

Afraid I don’t know. I’m waiting on @algernon to answer some questions, and once he’s happy I’ll open a PR to Kaleidoscope. If further changes are necessary I’ll make them. I haven’t ever tried Chrysalis though and don’t really intend to, but if it’s necessary to get it tested and merged I will.

By Keyboardio 1.96.0 what do you mean exactly? Do you mean Kaleidoscope? Chrysalis?

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [March 28, 2020, 1:09am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/31 "2020-03-28T01:09:46Z")

</div>

Arduino is 1.8.12  
Kaleidscope  
keyboardio (board) is 1.96.0

 ![keyboardio196](https://canada1.discourse-cdn.com/flex031/uploads/keyboard/original/2X/a/a0ad02600a0e16a26f6bf338c71f437d89bdd071.png)

---

<div class="post-metadata">

**Author:** ![bjn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bjn/32/5337_2.png) [@bjn](https://community.keyboard.io/u/bjn)\
**Post date:** [March 28, 2020, 1:49am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/32 "2020-03-28T01:49:07Z")

</div>

Did you try with the latest code on the [refactor branch](https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain/tree/refactor), as well as just the latest release?

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [March 28, 2020, 2:30am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/33 "2020-03-28T02:30:51Z")

</div>

I was not using refactor, but master; sorry.

However, after getting refactor. I get a new error.

> C:\Users\JP\AppData\Local\Arduino15\packages\keyboardio\hardware\avr\1.96.0\libraries\Kaleidoscope\src/Kaleidoscope-LEDEffect-DigitalRain.h:3:10: fatal error: kaleidoscope/Runtime.h: No such file or directory

So it looks like in DigitalRain.h is calling Runtime.h, which doesn’t exist.

> #include “kaleidoscope/Runtime.h”  
> #include \<Kaleidoscope-LEDControl.h\>

---

<div class="post-metadata">

**Author:** ![bjn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bjn/32/5337_2.png) [@bjn](https://community.keyboard.io/u/bjn)\
**Post date:** [March 28, 2020, 3:50am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/34 "2020-03-28T03:50:45Z")

</div>

Hm. I’m not in a position to debug right now, but I logged in to home  
where it’s working for me, and I’ll tell you what versions things are,  
in the hope that it may help in some way.

My ~/Arduino/hardware/keyboardio repo is at commit 55065ce, and it  
shows that nothing is untracked other than  
avr/libraries/Kaleidoscope-LEDEffect-DigitalRain.

My ~/Arduino/Mode01-Firmware is based on commit 2f9d140 and my changes  
are just disabling some plugins, adding Digital Rain, and changing the  
keymap.

I appear to have Arduino 1.8.10.

I have a file called Runtime.h in  
~/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/kaleidoscope/Runtime.h  
and that Kaleidoscope subdir is a git submodule – could it be that  
you didn’t init/update your submodules when you updated?

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [March 28, 2020, 5:28am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/35 "2020-03-28T05:28:55Z")

</div>

Ok. I uninstalled arduino and whacked everything, didn’t clean the registry but reinstalled, redid preferences, get the board, etc.

I got christmas lights and led fire to work but no go on digital rain. Will mess with it more tomorrow.

Thanks Bart for your help.

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [April 3, 2020, 7:25am UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/36 "2020-04-03T07:25:23Z")

</div>

FWIW, `kaleidoscope/Runtime.h` needs Kaleidoscope master. It’s not in any of the releases yet, I believe.

(And I’ll try to get back to answering those pending questions so we can proceed - sorry!)

---

<div class="post-metadata">

**Author:** ![fire](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@fire](https://community.keyboard.io/u/fire)\
**Post date:** [April 3, 2020, 6:30pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/37 "2020-04-03T18:30:38Z")

</div>

Which were the christmas lights you got working?

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [April 3, 2020, 7:13pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/38 "2020-04-03T19:13:50Z")

</div>

Yeah, I tried copying runtime.h and runtime.cpp, then it errors out on device.h, then I copy that in, etc.; eventually I get to a code error (not missing a file or something) and I stop there, then I have to back out all my changes.

I don’t mind troubleshooting until I get to the point where I gotta go modifying code. Man’s gotta know his limitations.

---

<div class="post-metadata">

**Author:** ![fishheadsoup](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/fishheadsoup/32/161_2.png) [@fishheadsoup](https://community.keyboard.io/u/fishheadsoup)\
**Post date:** [April 3, 2020, 7:14pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/39 "2020-04-03T19:14:25Z")

</div>

Christmas Lights:

> [@New simple LED effect for blinking Christmas lights](https://community.keyboard.io/t/new-simple-led-effect-for-blinking-christmas-lights/3445):
>
> Plugin name: Kaleidoscope-LED-ChristmasLights Author: Andrew vonderLuft Source URL: [https://github.com/avonderluft/Kaleidoscope-LED-ChristmasLights](https://github.com/avonderluft/Kaleidoscope-LED-ChristmasLights) Description: LED effect for blinking multicolor Christmas lights

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [April 3, 2020, 7:30pm UTC](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671/40 "2020-04-03T19:30:34Z")

</div>

> [@fishheadsoup](#):
>
> Yeah, I tried copying runtime.h and runtime.cpp

Selectively copying things won’t work, it’s all very interwined within Kaleidoscope. You gotta clone/copy the whole repo.

[Previous page](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671.md?page=1)

[Next page](https://community.keyboard.io/t/new-plugin-digital-rain-the-matrix-falling-code-effect/671.md?page=3)
