Iwork at a high school and do not have the greatest experience with LED lighting. I have a basic knowledge of how to patch LED lights. We are fortunate to have 2 spaces where we have LED lights set up. In our mini theatre our LED lights are patched in Universe 1 and they are controlled individually,, fairly easily. I patched them like so... Channels 100 thru 110, type of light is K9 PUP, 4 channel, at address 100. This allows us to control each light seperately. However, in our auditorium space, I cannot control the lights the same way. They are in Universe 2. I have ETC Color source Par's DB, 4 channel. They are set at address 001. Channel 513 is being used to control them all at once. How do I programm these lights so that we can control them individually like we do in our other space? Do I patch the lights this way...513 thru 530 at address 001? The lights will not turn on unless 513 is engaged, then 514 is red etc...
Anyone have any suggestions on how to program my system to turn on outdoor lights if sunrise occurs after 7:00am? Should I run a scheduler at 7:00am every day and then turn on lights if it is nighttime? (I would then run a second scheduler at Sunrise to turn off all lights). Or is there a more efficient way to do this?
I do something similar with my lights but I don't let them run all night so I have a scheduler event based off of sunset to turn them on and then another to turn off in the middle of the night. I then do the opposite in the morning with a scheduler event based off of sunrise to turn them back on as I'm leaving for work and a set time to turn them back off after it's plenty bright out. Using either the day/night time or sunset/sunrise variables should give you dynamic control of your times based on the time of the year without having to reprogram.
Because I don't leave them on all night. I turn them on at Sunrise and off at 11:30. Now that the sun is rising fairly light it would be nice to have them on in the morning as I sometimes leave while it is still dark and I would like them on .
I realize that I could always turn them on at sunrise but that is a waste for most of the year as I only care when the sun is rising later in the morning when I am leaving and when others are arriving at our house.
Thanks Bruce - I do currently use Schedulers for turning lights on at Sunset. I like your idea about IsDark - I will use that in this programming, and in the house where I have a motion sensor turn on a hall light after sunset - but 30 mins before sunset would work better.
I've been trying essentially combine the blink and fade sketches together. I would like the LED string that I'm working with to blink 3 times, then fade up and down 50 times, then repeat the whole process. I've read several different forum posts that almost describe what I'm trying to do, and looked at several example sketches.
This is my code (in the led fade up and fade down section I'm trying to use 2 cycles instead of the 50 for testing purposes). The code runs without errors, but doesn't do what I want. I think it is likely something simple I've missed.
Does that even compile?
First, read the sticky at the top of the forum "Read this before posting a programming question". If you post your code as described in the sticky, more forum members will read it.
Also, you have global 'counter' and 'counter2' variables. Those are NOT the same as the local 'counter' and 'counter2' variables you define in your for loops! In your first for loop you define a local 'counter2' variable but use the global 'counter' variable to control the for loop. After the first time through the loop() function the global 'counter' never gets reset to 0 and therefore the first for loop does not execute the second and subsequent times through the loop() function. This is why it appears you can't "make the process start all over again."
Admittedly I am unsure of exactly what I'm doing. This is the code formatted correctly for the forum. I tried many different control structures while looking at the language reference. This code does compile and successfully flashed the LEDs then begins to fade them. It just never starts to flash the leds again after a set number of fade cycles.
well first of all, you initialize counter2 int the loop, and the increment counter, that may work, but only by coincidence, and probably only once, after which the loop is not looping anymore because the global variable has kept increasing but is never reset.
This loop only runs twice initially, but since brightness is not reset, the fading in and out is still happening, but the faded amount only lasts 30ms. Anyway it is not hugely complicated, but you got it quite wrong. Fix the first loop first.
then for the second loop, how about within the for loop you do something like
When you want to add some zest to your lighting, LED strips are always a great option to explore. They cover a much larger area than traditional light fixtures and have a diverse range of cool effects. No more boring monotone lighting for you.
That said, to enjoy the dynamic capabilities of some LED strips, you will need to program them during the initial set up. If you are not big on electronic skills that may sound a bit daunting but it does not have to be. With some guidance, you will have your programmable LED strips running in no time.
They are all solid choices but each offers different features. The CCT LED strip is ideal if you would like warm cozy lighting. For more color options, aim for the RGB and RGBWW LED strips. However, if you would like both color and vibrant displays, then the .go right ahead and order some addressable LED strips.
Further, among the 3, addressable LED strips are the programmable choice. This is because, unlike the other LED strips, they are controlled using data signals and not by adjusting power supply to its LEDs.
There are hundreds of effects that you can create using addressable LED strips. Programming your LED strip gives you a chance to decide which of these possibilities you would like to implement. Think of it as customizing how your LED strips work as opposed to them working arbitrarily.
In essence, the Arduino is being applied as a microcontroller. The code you input on the computer is relayed to the physical board of the Arduino which relays it to the addressable LED strip as a data signal.
The resistor is between the Arduino and the LED strip is meant to protect the addressable LED strip from power surges. It also helps to reduce the annoying vibrating hum that sometimes occurs in such connections.
As opposed to writing software from scratch which would require significant skill, there are libraries that you can download. The term library here refers to software that is like a sketch with a basic programming framework. Once you install it, you can then add some code to create your preferred effects.
I am working on a Turn Signal, Brake Light and Headlight controller for my motorcycle with the Arduino. The issue I have came up with is that while I push a button for the turn signals I get a delay before the brake light will come on(not a good thing ) What I want to find out is there a way I can program the Arduino to not have these delays?
You did not post in the wishful thinking forum, or in the right my code for me forum. You posted in the programming forum. Therefore, the first thing we want to see is the program that you need help with.
Once you know what you want the Arduino to do, check that doing all those things is not illegal. Flashing headlights are illegal in some places. Flashing brake lights are illegal in a lot more places.
The lights on your bike are fine for you, I am doing a custom bike and I want a custom system. There is people on here doing things that have already been done but that doesn't keep them from learning and that is what the Arduino is for.
The laws a very defined and lighting systems on vehicles but that doesn't make them right. Out of all of the technological advancements car manufacturers have not improved upon these for safety factors. I am looking beyond what the car manufactures haven't done.
You are not going to be reading anything while those delay() calls are happening. Right now, before you write any more code, would be a good time to learn about state machines and the millis() function, and to forget that delay() exists.
What kind of switches are you using? Japanese bikes typically have on/off switches for the turn signals. Turn the switch on to start the blinking; turn the switch off to stop the blinking. Harleys have momentary contact switches. Push once to start the blinking; push again to stop the blinking. Harleys, at least, stop the blinking automatically after a period of time, a distance, or a lean angle as occurred. are you planning to implement any of those features?
3a8082e126