You helped me a few years ago with a sketch and now I’m back for more. . I’m making a cloud lamp and I’d like to have a lightning effect inside. I have an Arduino Mega and a short strip of WS2812B NeoPixels. I want the effect to be random, like real lightning. For example, three quick flashes, dark for several seconds, then a slower flash fading up; that kind of thing. I thought I could edit the strobe sketch or the Halloween eyes, but I don’t understand how to use the random function. Would love some help!

What I want to do is press a number, on a 3 X 4 keypad and have the sketch run a 35 second light show loop (I do light painting, so I start the show and start walking, while the photographers take a 30 second exposure.

When I compile this sketch, I get an error message for line 141 and 3 more for line 201:

Error message given for line 141: ‘theaterChase’ was not declared in this scope

Error messages given for line 201: expected unqualified-id before ‘for’

Attachments:

The above keypad_test .ino is a version of my modified Button_Cycler_Mine.ino, which works great, but if I want loop (case) 5, I do not want to run the previous 4, just to run 5 and then power down and repeat for a second shot.

Attachments:

Since the Arduino fully resets after a power loss, and since the Arduino isn’t the greatest when it comes to multi tasking, you might want to consider using a multi-position switch or a rotary selector switch. They can be found in several different shapes … from rotating to sliding, small, big, multi layer etc.

In your case you’d need only 5 or 6 positions, single layer … position 6 could be “OFF” for example.The advantage would be that the last used position is remembered (unless you change the position of the switch of course).

You can choose to use 5 pins or make a more complex setup by using an analog pin and connecting a different resistor per pin. That last solution obviously makes things a little more complicated, but will spare you the use of pins if you would need pins for other purposes.

Attachments:

I found the issue with my keypad sketch, when I re-typed one of the 240/302 code lines, I corrected the 240/302 error but accidentally added another letter to the code line – resulting in the “Not Declared” error 50 to 60 lines above that line – “FAT FINGERS”.

At the moment, I am 3D Printing parts for the keypad holder, battery pack, Arduino holder and light stick spinner. I should have everything complete and wired together within a couple of day, so I can post a link to a sample video and/or a sample image. Revised code is attached.

Like I said above, the push button (button_cycler_mine.ino) advance sketch worked, but the keypad sketch was full of error message (cut and paste, using our favorite OS).

Attachments:

Oh wow, nice! I played with 3D printers for a while, but have to admit that it’s not ready for use by me yet hahah …Too much work and tweaking to get “normal” printing going and no budget for the more expensive ones.

I’m sorry for not being so much present the past days – work and hobby are seriously beginning to conflict.One of these days hahah … I love this stuff more than my job though … can’t wait to see your 3D print!I’ll try to find some time this week to go through your code.