Introduction: How to Make a Lightning Cloud

I really wanted to make a little cloud that would light up as though it was filled with lightning. After googling a bit, I stumbled upon "The Cloud" by Richard Clarkson. It's a beautifully executed concept and I wanted to see if I could make one too. There are lotsofexamples of "cloud lamps." What I like about mine is I built the shape of the cloud completely from scratch, so I wasn't left with a mostly round cloud (a common problem). I'm also really proud of the lightning animation I created.

This is the first of three steps. The second part of this project will be adding bluetooth control, so I can trigger weather patterns in the cloud via my phone. The third part will be automatically triggering weather patterns according to the day's weather report. I want an easy-to-use, "glanceable," aesthetically appealing weather indicator for my apartment. Plus I've heard cloud computing is the hot new thing.... :)

Stay tuned for those future Instructables!

Step 1: Gather Materials

Picture of Gather Materials

1. Cardboard

2. Cotton balls

3. Polyester batting, 3/4" thick. It's easiest to pick out batting by going to a fabric store in person to find the right kind. You want batting that's about an inch thick. Something like this, but I'd need to see it in person to know if it was the right thickness. If you go to a fabric store, they'll let you cut a smaller amount. It should be about $6.99 per yard. I used about 2 square feet.

4. Boning (like the kind used for corsets). I used a yard and could have found use for more.

5. Needle and thread

6. Hot glue gun

7. Adafruit Neopixel LEDs. I used these "Breadboard friendly" ones. You can also buy them in packs of 4.

8. Wire

9. Soldering iron

10. Microcontroller (I used an Adafruit Pro Trinket with the little battery backpack soldered on)

11. Sewing pins

Step 2: Build Cloud Structure

Picture of Build Cloud Structure

Using a piece of cardboard for the base, glue the boning to make the basic outline of your cloud. You can make hoops with the boning - I found it was easiest to sew the two ends of the boning together, and then glue the hoop directly onto the cardboard. I also tried leaving one piece of boning pointing out into the air like ribs. Both methods worked fine.

Rip your 3/4" batting in half, and hot glue it to the boning and the cardboard in tasteful, cloud-like folds. At some points, it will be easier to gently sew the batting to the boning to keep it in place. Keep in mind how many lumps you want your cloud to have, and the overall structure. You can augment later with cotton balls, but this part will define the overall shape of your cloud.

Be sure to leave a little door in half of the cloud, where you'll place the electronics. Make the part of the batting that will become the door a little thicker than you might otherwise. It's nice to have the extra support.

Step 3: Add Fluff Texture

Picture of Add Fluff Texture

Gently pull apart your cottonballs. I pulled apart about 30 while my hot glue gun was heating up. The cottonballs themselves have a bit of a circular structure to them, and if you tear them apart carefully you'll preserve some of those whorls, which looks really cool later when the light shines through. You can also unroll cottonballs so they'll make longer, stringier clouds if you want.

Drip hot glue directly onto the outside of the batting, and gently pat your cottonballs into place. You don't need to completely cover the batting. Since the batting is white and a little fluffy, if some is showing that's ok. I preferred to vary the amount of cottonballs I was using so the cloud would be differing densities - it's nice if the light can shine through more in some places and less in others.

Step 4: Add Electronics

Picture of Add Electronics

First, you'll need to solder your LEDs into a long strand. I usually
take the easiest route of soldering male-male jumper cables directly to the Neopixels. The wires are flexible, the connections are solid, and it's super fast and easy. No need to strip any wires! Test your connections as you go, so you can quickly fix any issues. The basic circuit for this project is very simple. I'm building mine on a breadboard for now, but for a more permanent project, you'll probably want to solder things together directly, or maybe use a little proto board. With only 5 LEDs, you probably don't need a capacitor, but I always throw one in anyway to be safe. The polarity of a capacitor matters. That means you need to plug it in correctly for it to work. There are several ways to recognize the polarity of your capacitor.

  • Look at the legs
    • Most capacitors will have legs with different lengths. The short leg is the negative side.
  • Look for a stripe or an arrow.
    • Most capacitors will have a light stripe down one side. That's the negative side of the capacitor

The negative side should be connected to GND. The other side attaches to PWR.

Connect power, ground, and signal from your microcontroller to your LED strand:

Arduino -------> Neopixel strand pin

#4 -------> Data Input pin

BAT+ --------> VIN

GND ---------> GND

As always, if you are new to soldering, I highly recommend Adafruit's Guide to Excellent Soldering.

Step 5: Upload the Code

Getting accurate lightning animation was super important to me for this project. I played around with lots of ideas before going with hand-picked data points and a simple moving average smoothing algorithm. I'm pretty excited about how it turned out!

https://github.com/molecule/cloud-lightning/tree/v...

You might need to update these two variables to match your setup:

https://github.com/molecule/cloud-lightning/blob/v...

You can also change these variables to make lightning strikes more or less likely:

https://github.com/molecule/cloud-lightning/blob/v...

Step 6: Put Everything Together

Picture of Put Everything Together

You can try different placements of the LEDs inside the cloud. I ended up adding some cardboard pieces on the inside, because I wanted some parts of the cloud to be a bit darker than other parts. I also left the animation playing for a while, and glued on a few more cottonballs wherever it felt right.

I wanted to be able to access the microcontroller, so I just temporarily hold the door closed with a pin through several layers of batting.

Comments

johnriederer (author)2017-10-16

I need help getting the program to load to my trinket Pro. I can load the "Blink" but when I try to load Cloud-Lightning I'm getting an error. "exit status 1 Error compiling for board Pro Trinket 3V/12MHz (USB)

What am I doing wrong?

molecule13 (author)johnriederer2017-10-17

Hmm, well you're getting a compile error (I can tell because the message you helpfully provided says "Error compiling for board"). That means that, as the compiler is trying to make the code into machine-understandable language, something went wrong. To understand what, we need more information! First, turn on the verbose messages for compiling in your IDE:

File->Preferences->Show verbose output during:. Tick boxes for compilation and upload.

Then try to compile again. You should get a LOT more information, and some of it will be useful :) In particular, I'm guessing you're missing one of the libraries you need to install (or you didn't restart the IDE after installing them). But we should be able to tell with more information.

johnriederer (author)molecule132017-10-17

Here is the full verbose compilation Thanks for the Help

Arduino: 1.8.3 (Windows 10), Board: "Pro Trinket
3V/12MHz (USB)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs
-logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware
C:\Users\John\AppData\Local\Arduino15\packages -tools C:\Program Files
(x86)\Arduino\tools-builder -tools C:\Program Files
(x86)\Arduino\hardware\tools\avr -tools C:\Users\John\AppData\Local\Arduino15\packages
-built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries
C:\Users\John\Documents\Arduino\libraries -fqbn=adafruit:avr:protrinket3
-ide-version=10803 -build-path C:\Users\John\AppData\Local\Temp\arduino_build_269669
-warnings=none -build-cache
C:\Users\John\AppData\Local\Temp\arduino_cache_672861
-prefs=build.warn_data_percentage=75
-prefs=runtime.tools.avrdude.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9
-prefs=runtime.tools.arduinoOTA.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1
-prefs=runtime.tools.avr-gcc.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2
-verbose C:\Users\John\Desktop\Lightning\cloud-lightning\cloud-lightning.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile
-logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware
C:\Users\John\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder
-tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools
C:\Users\John\AppData\Local\Arduino15\packages -built-in-libraries C:\Program
Files (x86)\Arduino\libraries -libraries
C:\Users\John\Documents\Arduino\libraries -fqbn=adafruit:avr:protrinket3
-ide-version=10803 -build-path
C:\Users\John\AppData\Local\Temp\arduino_build_269669 -warnings=none
-build-cache C:\Users\John\AppData\Local\Temp\arduino_cache_672861
-prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9
-prefs=runtime.tools.arduinoOTA.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1
-prefs=runtime.tools.avr-gcc.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2
-verbose C:\Users\John\Desktop\Lightning\cloud-lightning\cloud-lightning.ino

Using board 'protrinket3' from platform in folder:
C:\Users\John\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.9

Using core 'arduino' from platform in folder:
C:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20

Detecting libraries used...

"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++"
-c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections
-fdata-sections -fno-threadsafe-statics
-flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=12000000L -DARDUINO=10803
-DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR
"-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino"
"-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs"
"C:\Users\John\AppData\Local\Temp\arduino_build_269669\sketch\cloud-lightning.ino.cpp"
-o "nul"

"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++"
-c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections
-fdata-sections -fno-threadsafe-statics
-flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=12000000L
-DARDUINO=10803 -DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino"
"-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs"
"C:\Users\John\AppData\Local\Temp\arduino_build_269669\sketch\cloud-lightning.ino.cpp"
-o "C:\Users\John\AppData\Local\Temp\arduino_build_269669\preproc\ctags_target_for_gcc_minus_e.cpp"

C:\Users\John\Desktop\Lightning\cloud-lightning\cloud-lightning.ino:31:31:
fatal error: Adafruit_NeoPixel.h: No such file or directory

#include
<Adafruit_NeoPixel.h>

^

compilation terminated.

exit status 1

Error compiling for board Pro Trinket 3V/12MHz (USB).

molecule13 (author)johnriederer2017-10-17

Excellent! This is everything we need to figure this out. Typically, for compile errors, you want to look at the "first" error. Arduino helpfully puts that at the very end of the compile error, and I've copied it here for convenience:

fatal error: Adafruit_NeoPixel.h: No such file or directory

That basically means that you haven't installed or successfully set up the Neopixel library! So Arduino has no idea where that code is. The good news is, it's super easy to fix this. Head on over to Adafruit's excellent (as always) tutorial on installing the Neopixel library and you should be able to get past this error! Here's the link:

https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-installation

johnriederer (author)molecule132017-10-17

Thanks but now I get this error:

Arduino: 1.8.3 (Windows 10), Board: "Pro Trinket 3V/12MHz (USB)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\John\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\John\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\John\Documents\Arduino\libraries -fqbn=adafruit:avr:protrinket3 -ide-version=10803 -build-path C:\Users\John\AppData\Local\Temp\arduino_build_745192 -warnings=none -build-cache C:\Users\John\AppData\Local\Temp\arduino_cache_742529 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avr-gcc.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning\cloud-lightning.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\John\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\John\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\John\Documents\Arduino\libraries -fqbn=adafruit:avr:protrinket3 -ide-version=10803 -build-path C:\Users\John\AppData\Local\Temp\arduino_build_745192 -warnings=none -build-cache C:\Users\John\AppData\Local\Temp\arduino_cache_742529 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avr-gcc.path=C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning\cloud-lightning.ino

Using board 'protrinket3' from platform in folder: C:\Users\John\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.9

Using core 'arduino' from platform in folder: C:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20

Detecting libraries used...

"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=12000000L -DARDUINO=10803 -DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs" "C:\Users\John\AppData\Local\Temp\arduino_build_745192\sketch\cloud-lightning.ino.cpp" -o "nul"

"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=12000000L -DARDUINO=10803 -DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs" "-IC:\Users\John\Documents\Arduino\libraries\Adafruit_NeoPixel" "C:\Users\John\AppData\Local\Temp\arduino_build_745192\sketch\cloud-lightning.ino.cpp" -o "nul"

"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=12000000L -DARDUINO=10803 -DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs" "-IC:\Users\John\Documents\Arduino\libraries\Adafruit_NeoPixel" "C:\Users\John\Documents\Arduino\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp" -o "nul"

"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=12000000L -DARDUINO=10803 -DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs" "-IC:\Users\John\Documents\Arduino\libraries\Adafruit_NeoPixel" "C:\Users\John\Documents\Arduino\libraries\Adafruit_NeoPixel\esp8266.c" -o "nul"

Generating function prototypes...

"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=12000000L -DARDUINO=10803 -DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs" "-IC:\Users\John\Documents\Arduino\libraries\Adafruit_NeoPixel" "C:\Users\John\AppData\Local\Temp\arduino_build_745192\sketch\cloud-lightning.ino.cpp" -o "C:\Users\John\AppData\Local\Temp\arduino_build_745192\preproc\ctags_target_for_gcc_minus_e.cpp"

"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\John\AppData\Local\Temp\arduino_build_745192\preproc\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\Users\John\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=12000000L -DARDUINO=10803 -DARDUINO_AVR_PROTRINKET3 -DARDUINO_ARCH_AVR "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\John\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\eightanaloginputs" "-IC:\Users\John\Documents\Arduino\libraries\Adafruit_NeoPixel" "C:\Users\John\AppData\Local\Temp\arduino_build_745192\sketch\cloud-lightning.ino.cpp" -o "C:\Users\John\AppData\Local\Temp\arduino_build_745192\sketch\cloud-lightning.ino.cpp.o"

C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning\cloud-lightning.ino: In function 'void setup()':

cloud-lightning:85: error: 'simple_moving_average' was not declared in this scope

functionPtrs[0] = simple_moving_average;

^

cloud-lightning:86: error: 'random_moving_average' was not declared in this scope

functionPtrs[1] = random_moving_average;

^

C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning\cloud-lightning.ino: At global scope:

cloud-lightning:127: error: expected unqualified-id before ')' token

})

^

Using library Adafruit_NeoPixel at version 1.1.2 in folder: C:\Users\John\Documents\Arduino\libraries\Adafruit_NeoPixel

exit status 1

'simple_moving_average' was not declared in this scope

Invalid library found in C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning: C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning

Invalid library found in C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning: C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning

molecule13 (author)johnriederer2017-10-18

The three most important errors are shown at the bottom again, just like last time:

C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning\cloud-lightning.ino: In function 'void setup()':

cloud-lightning:85: error: 'simple_moving_average' was not declared in this scope

functionPtrs[0] = simple_moving_average;

^

cloud-lightning:86: error: 'random_moving_average' was not declared in this scope

functionPtrs[1] = random_moving_average;

^

C:\Program Files (x86)\Arduino\libraries\Cloud-Lightning\cloud-lightning.ino: At global scope:

cloud-lightning:127: error: expected unqualified-id before ')' token

})

Those look.....strange. I encourage you to download the code again from my github account: this looks like a copy-and-paste problem.

You're also getting complaints from the IDE about your file structure. It looks like you have a folder called "Cloud-Lightning" in the Arduino/libraries folder. I am assuming Cloud-Lightning refers to the code for this project, in which case the "libraries" folder is not the right place for it! Move it up one level so it's just in the "Arduino" folder.

johnriederer (author)molecule132017-10-18

OK I think that the code loaded. It's not turning on the LED. I only have one connected right now. Two more questions:(for now) How do I know that it loaded correct and if I have the LED connected to Batt, 0 and Pin 4 is that correct? When "verify code after upload" is turned on I do see errors.

Clayface18 (author)2017-10-10

I juat want to say thank you for your instructable.except for the actual programming part(installing/uninstalling drivers like crazy) everything went smoothly. Your code is amazing and thank you for sharing. Only question i have is there a way to adjust colors of neopixels so they flash different colors?

molecule13 (author)Clayface182017-10-11

You're very welcome! I'm sorry the drivers were a challenge, but nice job on getting it all worked out! And yes: there is a way to adjust the colors of the neopixels :) Here's the relevant line of code:

https://github.com/molecule/cloud-lightning/blob/m...

strip.Color is one of several methods used to change the color of a certain pixel! It takes either two argument (as in my code, linked above), or four arguments (as in the Adafruit tutorial, linked below). They're really the same: they just take the same arguments in different forms. Let's look first at the four argument version.

The first argument is "n", the pixel that you want to change. The next argument is the red value, the third argument is the green value, and the last argument is the blue value. When you're building a color, you'll decide how much of that color you want to be seen for each LED. So, if you wanted to make purple, you might pass in even amounts of red and blue, and zero green:

strip.setPixelColor(pixel, strip.Color(50, 0, 50));

Whereas if you wanted to do turquoise, or any kind of teal/blue/green mixture, you would pass in some amount of green and some amount of blue, and zero red:

strip.setPixelColor(pixel, strip.Color(0, 20, 50));

All mixtures will create a color, you just have to experiment until you find the right amount of mixture for the colors you want. Right now in my code, every value passed in to strip.Color is the same:

strip.setPixelColor(pixel, strip.Color(scaledWhite, scaledWhite, scaledWhite));

That means the LEDs will flash white. I hope that this little extra bit of information helps you!

To learn even more, I highly recommend Adafruit's learning system! https://learn.adafruit.com/adafruit-neopixel-uberg...

TimothyO15 made it! (author)2017-08-12

My daughter loves her lightning cloud. Thank you for the code and directions!

molecule13 (author)TimothyO152017-08-13

Thanks for sharing your cloud! So happy to see :)

Snoogans79 (author)2016-07-22

Awesome lamp! I made it successfully as my first ever electronics project. I used a UNO and it all went very smoothly. Your code was so user friendly and I didn't have one issue. However......when my lamp is powered off computer usb it works brilliantly. I bought a mobile power bank to use as a power source for the lamp rather than the battery pack, and it does power the lamp but for only a few minutes before it seems to switch itself off!? I've checked over the power bank and can't see why it's doing it. Any ideas? The power bank is - 2600mAh 5V DC 1.2A output. Sorry, real novice here.........thanks!

molecule13 (author)Snoogans792016-07-24

Hi! Glad to hear you had a good time and the code was user friendly.

For the power issue...the fact that it's switching itself off sounds almost like a safety mechanism...are you shorting the power somehow? You'd need to post some pictures or a wiring diagram (or both) to get more help, though.

Snoogans79 made it! (author)molecule132016-07-26

Thanks for responding. You'll see my photos so hopefully that will show what I have done! Apologies for not really knowing how to do a wiring diagram (yet?)! I have since purchased a power adaptor for the arduino and it has been running fine! I am running 4 LEDs from the board to clarify. Without knowing for certain ( which I don't) my concern was exactly what you suggested, that I was somehow shorting the board out. I checked all my connections and couldn't find a problem and so tried the power adaptor and all seems fine. I do wonder if there can be an intermittent supply drop from the usb external battery? I'm really just guessing though! And that could have been enough to stop powering the unit? Anyway, take a look and let me know you're thoughts! Many many thanks for your time and input!

molecule13 (author)Snoogans792017-01-04

Sorry this response is so late! I just now found out that Instructables doesn't seem to email you about every comment, so I didn't realize a lot of these were here until just today.

Anyway, in your picture I can't see where the red, green, or yellow wires are going. I'm suspicious that the green and yellow in particular are not hooked up correctly. I'm also very concerned that you don't seem to have any wire connected to ground. Can you post a picture with the entire circuit visible? (Or maybe by now you've moved on, which would be understandable :) ).

Snoogans79 (author)molecule132017-01-05

Wow! Thanks for replying after such a long time. I have moved on but only after I sorted the power issues I was having and put the cloud into a mains adaptor! I think the power bank I had was faulty which led me down a dark path for a while! Pardon the pun. I love my cloud though and all credit to you for your amazing posts. It was very straight forward so thank you very much. I'm still a novice but certainly a lot more confident in trying things out now!

Just something I've noticed:

Many USB power banks shut off if the draw is too low after a minute or two. Put a phone or something else on the bank and see if it stays on.

I can almost guarentee that the cloud is drawing so little current that the power supply is switching off because the load detector isn't tripping.

jadedraven (author)2015-12-10

Have you made any headway on your goal of adding a speaker or "weather for the day"? This is amazing on it's own, but I'm imagining a thunderstorm at night for an hour or two, then a "weather cloud" greeting me in the morning and changing throughout the day.

Hoping to order the parts on Adafruit today for a Christmas present.

molecule13 (author)jadedraven2015-12-12

Yes I have! I expect the final instructions for the "weather cloud" will be up by next weekend for sure. One change is if you want to control the lightning cloud over WiFi, you'll want to use something called the Particle Photon. It's a very easy to use board, and would replace both the Pro Trinket and the Bluefruit modules. (Initially I was thinking I'd need the Bluetooth in place to talk to the Arduino board, but with the Particle Photon everything is combined into one convenient place. Even if you decide you don't want to hook up your lightning cloud to the Internet, you can control it via the Photon just as easily. Here's where to order it one, and I'll post versions of the code that work on the Photon soon:

https://store.particle.io/

kcyree (author)molecule132017-01-03

I am also interested in the weather cloud idea and about to build a massive (70+ cubic feet) lightning cloud. Since it's being installed in a dark hallway roof, it'd be nifty if I could perform effects aside from lightning. Did you make any further progress toward this, or do you need any help?

Do you have the"Weather Cloud" instructions up yet? This is awesome!

Id love to try this out as well!!!... till then Ill be ironing out my issues with no lights flickering yet =/

Kingkeener (author)2016-12-23

Dumb Question: If you used an Arduino Uno to display the lightning effects in the video, how did you transfer the code to the Pro Trinket?

molecule13 (author)Kingkeener2016-12-24

In the video of the cloud, I was using a Pro Trinket!

Also, it's not a dumb question but I'm not sure I totally understand it well enough to give a good answer. Here are some guesses about what you mean, and answers:

Do you mean why does the code work on both? Many different Arduino board are compatible, meaning the same code will work on different boards. In some cases you need to change pins, or remove functionality that isn't there, or shrink the size of the sketch for a smaller board, but for the most part the same code will work everywhere. That's the case here: this code will work without changes on both the Pro Trinket and the Uno.

Do you mean literally how do I transfer it? The code lives on the computer, so to put it onto a Pro Trinket, I just plug the pro trinket into the computer and hit "upload".

Feel free to ask follow-ups if I didn't understand your question the first time!

Freakydna (author)2016-08-20

Hi, have a problem and cant open die .ino from u...

By others have never a problem .u know what is it ?

Want use a Arduino Uno.

best regards

Freakydna (author)Freakydna2016-08-20

He have a Problem by launch4j ???

Akin Yildiz made it! (author)2016-07-24

fun stuff

trazzman (author)2016-06-19

Im going to watch this. Awesome decor with one caveat, how will you clean it or keep dust from accumulating in it? I

pnwsteve made it! (author)2016-04-08

I just built it, only using 3 leds so have to see if 5 makes a diff, really cool and thanks. Starting to play with the code, I want to add a clap on/clap off for it so I can hang it without a switch. Just starting to play with the code, now I need a new soldering iron and articulated clamp since this introduced me to the Adafruit board. I want to experiment with adding some black spray paint to the bottom to look like a rain cloud, maybe powdered paint and hairspray well will post up pics when it's done.

Also added a switch

molecule13 (author)pnwsteve2016-06-14

Love it! Fun idea with the black spray paint. Thanks for sharing your cloud!

Danielm2998 (author)2016-06-07

Just ordered the necessary electronics for the project and i have high hopes for the outcome. I will need some help with the coding as i have only built small electronics from kits such as radios and the electronics of a guitar. I will be posting soon once i get my electronics and i would love some help and feedback. The cloud looks great by the way. I can only hope to get close to that.

molecule13 (author)Danielm29982016-06-14

Will be happy to help! Look forward to seeing your finished product :)

digitalmonkeyman (author)2016-01-28

Please post an 'ible with a photon board and sound!

I know I'm a little pain, but I want to make this for my daughter's birthday in early March! And not being a programmer, I need step by step! :)

Haha it's not that I don't want to! It's that it turns out parsing the json is a much bigger mess than I thought, and I may need to separate out certain parts of the code into another script, which is a whole different topic I need some time to look into! Also as of right now it won't have sound, because I don't have access to speakers.

ElizabethZimmer (author)2016-01-17

I love this for a weather unit I am teaching. Do you have any suggestions as to how I can do the necessary attaching but without soldering (they are elementary aged and I've never done it before :))? Thank you!

fredthejedi (author)2015-12-18

Very cool project!

Im new to electronics and programming and all of this is super overwhelming but I'm hanging in there.
I need your help though (sorry if this is super basic)
I've downloaded the arduino side and have configured the pro trinket 3v board option.

What programmer do I use?
Do I simply copy and past the code and hit upload?
When I click verify it gives me this error: "Documents/Arduino/Test1/Test1.ino:1:31: fatal error: Adafruit_NeoPixel.h: No such file or directory

#include <Adafruit_NeoPixel.h>

^

compilation terminated.

exit status 1

Error compiling."

Thanks for your help:)

molecule13 (author)fredthejedi2015-12-19

Ah! I know exactly what that error is. You need to download an install the Adafruit Neopixel library for your IDE to be able to compile the code. Here's a really good description of what to do:

https://learn.adafruit.com/adafruit-neopixel-uberg...

If you're using the Pro Trinket, you'll use the USBTiny programmer. Here's some helpful info about using Pro Trinkets:

https://learn.adafruit.com/introducing-pro-trinket...

Yes - once you've installed the Neopixel library, you'll just copy and paste the code from my github into the IDE and you should be able to upload it from there. Keep in mind that the Pro Trinket must be put into "bootloader mode" but pressing the little "reset" button on the top of the board. (There's a ton more information at the above link about Pro Trinkets, so I'd recommend checking that out).

By the way - welcome to the world of hobby electronics! This was a very well-asked question - you gave me all of the information I needed to help you out, including the actual error message. Thank you! (Asking good questions is a seriously valuable skill, so good work).

fredthejedi (author)molecule132015-12-20

Thank you much! Answering a question well is a valuable skill as well:)

I was successfully able to upload the code and have the LED's flash!

I've run into a different problem now... The light flashing is red on the first LED and not very bright. As soon as I add another LED in series like your diagram shows, the light on the first LED becomes very faint and the second LED doesn't flash at all... Could this be a soldering problem? All four of my LEDs do this. Also Im powering the trinket through USB connected to my computer.

molecule13 (author)fredthejedi2015-12-21

Awesome! Glad to hear you got past that hurdle.

As for
the LED problem, that sounds like a power issue. It could be related to
soldering... but it could also be that the USB from your computer
doesn't provide enough current... What pin is the Neopixel PWR line
connected to on the Arduino? If you post a super clear picture it might
make it easier to debug.

fredthejedi (author)molecule132016-01-07

Ok. I think I fried my previous neopixels, so I bought some new ones and changed out the tip on my soldering iron. The soldering now is easy and spot on. However, I'm still having trouble with the lights not coming on. The wiring is just as your diagram shows.

molecule13 (author)fredthejedi2016-01-08

Hmm ok, well I'm not sure. It does look like you have the wires going the right places, but one funky thing is that you have the headers to the Pro Trinket on "upside down". See the black plastic part of the headers? That should be UNDERNEATH the Pro Trinket.

I'm wondering if they're not sticking all the way in to the breadboard,
which means you're not getting a connection to your LEDs. That would prevent things from lighting up!

fredthejedi (author)molecule132016-01-11

So I knew this when I soldered the headers upside down, but thought it'd be easier to hook on that battery pack if I left it some more clearance from the board. Also my breadboard only needs shallow contact, so no worries there. I did solder the jumper cables onto the headers just in case though, still no luck, no lights. Any thoughts?

molecule13 (author)fredthejedi2016-01-11

Wait - so you DON'T have the battery backpack attached (and therefore no battery), but you've connected the LEDs to the BAT output? But, the BAT output is the output of the battery, so if you don't have that attached... I guess you can see where I'm going :) Try plugging in your LEDs to the 3v output. In general, USB cables probably don't provide enough current to keep them on, so the best way to test is with the battery. Hope that works!

fredthejedi (author)molecule132016-01-13

Yes! it Works! I think you are beginning to understand how hardware-illiterate I really am :) But it's been fun learning! One last question... So to add an on/off switch, did you sever the connection between the two copper circles in the white square?

molecule13 (author)fredthejedi2016-01-14

Yay learning! I'm also mostly hardware illiterate but I get better every time I work on a project! And yes - to add the on/off switch, you slice through the connection ("trace") between the copper circles on the backpack. (There are some pictures in the main Instructable that should help).

digitalmonkeyman (author)2016-01-08

Please post an 'ible with a photon board and sound! This rocks!

Working on it!! Darn full-time job keeps getting in the way... being sick didn't help either. Hopefully soon!

HA! I hope you get better quick! Work, it's a four letter word!

Working on it!! Darn full-time job keeps getting in the way... being sick didn't help either. Hopefully soon!

Twogunrocky (author)2016-01-07

Hi, i'm totally new to all this raspberry, Adafruit, Link it stuff.... but can't wait to get involved and learn it all.

I'm gonna sta with your amazing ibble, I love it.... first question I have, can I purchase the Adfruit 3.3v logic, or does it have to be the 3v ?

thanks in advance.