Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
Hi, I've recently put together a setup with a tactile/momentary switch, latching switch, and Arduino Nano using an altered version of the All Effects sketch from this site. However, although the tactile switch works perfectly in toggling from one sketch to another, the latching switch has a peculiar tendency to pause the effect when I power it off (it powers on fine). Of note, the power LED on the Arduino itself shows on and off when I push and release the latching switch, but when in the off position it pauses the sketch. I was told by a friend this shouldn't be happening since the VIN input on the Arduino shouldn't be affected by code. Hopefully someone here can help me, as it would not be very product friendly to have to manually unplug the adapter from the DC jack every time you want to power off :) Thanks in advance!
Here is a "schematic" of my setup to the best of my knowledge:
case 7 : { // Fire - Cooling rate, Sparking rate, speed delay Fire(55,120,15); break; }
// simple bouncingBalls not included, since BouncingColoredBalls can perform this as well as shown below // BouncingColoredBalls - Number of balls, color (red, green, blue) array, continuous // CAUTION: If set to continuous then this effect will never stop!!!
case 8 : { // meteorRain - Color (red, green, blue), meteor size, trail decay, random trail decay (true/false), speed delay meteorRain(0x38,0x00,0xff,10, 64, true, 30); break; } } }
// used by NewKITT void CenterToOutside(byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) { for(int i =((NUM_LEDS-EyeSize)/2); i>=0; i--) { setAll(0,0,0);
// used by NewKITT void OutsideToCenter(byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) { for(int i = 0; i<=((NUM_LEDS-EyeSize)/2); i++) { setAll(0,0,0);
for (int j=0; j < 256; j++) { // cycle all 256 colors in the wheel for (int q=0; q < 3; q++) { for (int i=0; i < NUM_LEDS; i=i+3) { c = Wheel( (i+j) % 255); setPixel(i+q, *c, *(c+1), *(c+2)); //turn every third pixel on } showStrip();
delay(SpeedDelay);
for (int i=0; i < NUM_LEDS; i=i+3) { setPixel(i+q, 0,0,0); //turn every third pixel off } } } }
void Fire(int Cooling, int Sparking, int SpeedDelay) { static byte heat[NUM_LEDS]; int cooldown;
// Step 1. Cool down every cell a little for( int i = 0; i < NUM_LEDS; i++) { cooldown = random(0, ((Cooling * 10) / NUM_LEDS) + 2);
// Set all LEDs to a given color and apply it (visible) void setAll(byte red, byte green, byte blue) { for(int i = 0; i < NUM_LEDS; i++ ) { setPixel(i, red, green, blue); } showStrip(); }
Well it looks like I spoke too soon...all I had to do was move the latching switch to the 5v on the LED strip itself (between the positive on the DC jack and the 5v on the LED strip). A no-brainer for most I'm sure :p Hopefully this helps people anyway!
Things like this happen to all of us haha - but thanks for posting anyway! You're right: someone will run into this as well and find your post helpful 👍 🙂Â
@lakerice Do you understand the reason why you had to make the change that you did?
Originally, you had split the power from the + of the DC power, and placed the latching switch only on the leg that went to the Arduino, which means that when you opened the switch, you powered off the Arduino, but left the LED strip powered on. The LED driver chips on the strips simply latch the last received command, so with the Arduino powered-off, and no additional commands, the strip simply displays whatever the last state was. When you clos the latching switch again, the Arduino reboots, and restarts at the last saved pattern.
When you move the latching switch from the leg that goes to the Arduino, to the leg that goes to the LED strip, opening that switch will now turn off the power to the LEDs, and so the strip will no longer illuminate. Interestingly, the Arduino will still be running, and will still be responding to presses of your momentary switch - you just won't be able to see any results of that. If you close the latching switch again, the LED strip will light up, and the pattern will be whatever the Arduino is currently displaying - it won't revert back to the starting pattern.
If your intention is to power off both the Arduino *and* the LED strip with the latching switch, you need to move it to a slightly different place. Placing the latching switch immediately after the + terminal from your DC power, and then adding the two legs for power to the Arduino and LED strip *after* the latching switch, will accomplish this.
WordPress WordPress is one of the best tools for Blogs and Content Management Systems.
7-Zip One of the best, free, and most efficient Windows archive and unarchive utilties around. Support quite a few formats as well.
AlternativeTo Great resource when you're looking for alternatives for an application that you'd like to use, but might not be available on your platform or the application you have is just not doing it right.
Internet Archive: Wayback Machine Ever wondered what a current or disappeared website used to look like? Check it! Go back in time ...
TinyMediaManager Small, but slick little application to manage your movies and movies meta-data (Windows, MacOS X and Linux!).
Animizer Animizer.net provides complete online toolbox for animations (GIF and APNG) - Edit, Assemble, Split or Convert, it's all there.
Links Page These and more of our favorite links can be found on the Links Page.
New Downloads
RenameMyTVSeries-2.3.2-QT5-Linux-x64-static-ffmpeg.tar.xzDate: 2025-07-10 - Size: 78.3 MBRename My TV Series, for Linux (64 bit QT5), a tool to assist in renaming TV Show episode files. This bundle comews with rather large static builds of ffmpeg and ffprobe.
RenameMyTVSeries-2.3.2-QT5-Linux-x64-shared-ffmpeg.tar.xzDate: 2025-07-10 - Size: 1.9 MBRename My TV Series, for Linux (64 bit QT5), a tool to assist in renaming TV Show episode files. This bundle relies on ffmpeg and ffprobe shared libraries on your system.
RenameMyTVSeries-2.3.2-GTK-Linux-x64-static-ffmpeg.tar.xzDate: 2025-07-10 - Size: 78.3 MBRename My TV Series, for Linux (64 bit GTK), a tool to assist in renaming TV Show episode files. This bundle comes with (large) static builds of ffmpeg and ffprobe.
RenameMyTVSeries-2.3.2-GTK-Linux-x64-shared-ffmpeg.tar.xzDate: 2025-07-10 - Size: 1.9 MBRename My TV Series, for Linux (64 bit GTK), a tool to assist in renaming TV Show episode files. This bundle relies on ffmpeg and ffprobe shared libraries on your system.
RenameMyTVSeries-2.3.2-Windows-x64-setup.exeDate: 2025-07-10 - Size: 48.8 MBRename My TV Series, for Windows (Intel 64 bit), a tool to assist in renaming TV Show episode files. Static builds of ffmpeg and ffprobe are included.
RenameMyTVSeries-2.3.2-macOS-Universal.dmgDate: 2025-07-10 - Size: 98.5 MBRename My TV Series, for macOS (Universal binary for Apple Silicon ARM and Intel 64 bit), a tool to assist in renaming TV Show episode files. Static universal binary builds of ffmpeg and ffprobe are included.
Downloads Page Find these and more Downloads on the Downloads Page, where you will also find articles references, operating system requirements and categories.
Amazon Ads
Support us by doing your shopping at Amazon.com, either click the link, or click one of the links below …
You can also sponsor us through these Amazon offerings:
Please consider disabling your ad blocker for our website.We rely on these ads to be able to run our website.You can of course support us in other ways (see Support Us on the left).