How to Make a Lightning Cloud

102,689

922

100

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

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

12. (Optional) a "large" capacitor. I follow the best practices recommended by Adafruit and used a 1000uf, 6.3V capacitor.

Step 2: 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

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

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

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.

Make It Glow! Contest

Third Prize in the
Make It Glow! Contest

Halloween Decor Contest 2015

Runner Up in the
Halloween Decor Contest 2015

9 People Made This Project!

Recommendations

  • Big and Small Contest

    Big and Small Contest
  • Game Design: Student Design Challenge

    Game Design: Student Design Challenge
  • For the Home Contest

    For the Home Contest

100 Comments

0
KarlL48
KarlL48

Question 3 years ago on Step 4

Hey all, I’m new to electronics and I tried to make the circuit board but I just can’t get it to work, also if I code, again new to that do I connect to my pc and complete that bit? Sorry if I come across stupid I’m just starting out. Any help would be great

0
treesap
treesap

Answer 3 years ago

We'll need some more info to diagnose your circuit problem. General things to check make sure that polarity of your capacitors is correct is that all wire connections/solder joints are good. It also looks like getting the Arduino programmed will be pretty essential to getting the LEDs to work.

As for doing that, I'd highly recommend starting here. It explains how to install the software, and some very basic introduction to Arduino. https://www.arduino.cc/en/Guide/HomePage

After that, try out this so you can practice putting software on the board and running it. It's just a really simple program that blinks an LED, but it'll let you get familiar enough to be able to load the cloud program to the board. https://www.arduino.cc/en/tutorial/blink

0
Obinrashed
Obinrashed

Question 3 years ago

hi can i add dfplyer and what code

0
GhostOddity
GhostOddity

Question 3 years ago

Thanks! It worked great for me I used the cloud for a contest Armies on
Parade for Warhammer. I have a question is there some where in the
code or wiring to change the color of the led?

lightencloud.JPG
0
TomF61
TomF61

Question 3 years ago on Step 6

Hi Molly just wondering if you'd progressed to sound and phone control yet?

0
sirron1957
sirron1957

Question 3 years ago

I see it's been a few years since you addressed adding sound to the cloud, have you made any progress on it??

0
BrydenR
BrydenR

Question 3 years ago on Step 4

so I have all the parts and the code is on the trinket. I can see the right flickering pattern with one led connected but with a very dim red light. once I connect the next led I get no lights at all and am only getting 1.63v across each one. I noticed you have a capacitor but I would expect 1 led to work fine but still no luck getting the proper bright light. I assume they still work at 3v from the trinket despite being a 5v led?

0
molecule13
molecule13

Answer 3 years ago

5V LEDs usually require 5 volts unless specified otherwise! (The LEDs I used above say: "can run at 3.5V" on their info page). What you're describing sounds exactly like you're not providing enough power, so since all the data fits the theory, I think that's your issue. Let me know if you have more questions!

0
rphutton
rphutton

Question 4 years ago

This is an awesome looking project! I'm gonna try it out myself and I was just wondering if you think this would work with an adafruit gemma m0 rather than the pro trinket? I have one laying around that I want to get some use out of.

0
molecule13
molecule13

Answer 4 years ago

Glad you like it! Please share a picture when you're finished :) It's always fun to see what people create!

In general, when assessing whether a project will work on a different piece of hardware, here are the questions to answer:

1. Will all the hardware connections fit and work?
2. Will all the software fit and work?

Since this project is only 3 pins, the Gemma should work just fine.
The Gemma M0 does have a new chip, though: ATSAMD21E18 instead of the Pro Trinket's ATmega328. The maximum sketch size on the Pro trinket is 28,672 bytes, which will definitely fit on the 256KB Flash of the Gemma M0.

So the last question is: will the software work? That's a question you can figure out through trial and error. First, you'll have to see if the Neopixel library has been updated to support this new board. Adafruit is super on top of things and their Neopixel library is one of the most popular ones they distribute so I would bet that it will work just fine! Best of luck!

0
rphutton
rphutton

Reply 4 years ago

Thanks for the advice! The local MicroCenter had a trinket in stock so I didn't have to try to adapt it to the gemma.

IMG_6058.JPG
0
AdamB476
AdamB476

Question 4 years ago on Step 2

Its shows a capacitor but its not in the list of items needed. What size do i need?

0
johnriederer
johnriederer

5 years ago

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?

0
molecule13
molecule13

Reply 5 years ago

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.

0
johnriederer
johnriederer

Reply 5 years ago

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).

0
molecule13
molecule13

Reply 5 years ago

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

0
johnriederer
johnriederer

Reply 5 years ago

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

0
molecule13
molecule13

Reply 5 years ago

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.

0
johnriederer
johnriederer

Reply 5 years ago

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.