@krisztian
Hi krisztian,
the singleLED board - as its name suggests - features only one LED output. If you want to have a setup with multiple LED strips you need to design a board with multiple outputs. I have already designed a board with 4 outputs, but I haven't built it.
In terms of software you need to register multiple sensors in your program like this:
#define numCh 4 //the number of outputs
const byte ledPins[] = {9,6,5,3};
byte ledLevel[numCh];
boolean ledDimWay[numCh];
//in the setup function request the dim levels from the gateway
for(byte i=0; i<numCh; i++) request(i, V_DIMMER);
//in the presentation function register multiple lights
for(byte i=0; i<numCh; i++) present(i, S_DIMMER);
//if you receive a signal, you need to check for the sensor id
setLED(message.sensor, requestedLevel);
//to set the LED level (function: setLED) you need to use the sensor id to determine brightness and pin
//Fade LED to set level
int delta = (level - ledLevel[child]) < 0 ? -1 : 1;
//Write to LED
analogWrite(ledPins[child], map(ledLevel[child],0,100,0,255));
I will probably publish the whole code once I have built and tested the 4LED controller (i call it "MySensors rainbowLED")
Hope I could help you
ThetaDev
@mfalkvidd said:
I am using them at 12V so the power would be ~4W. Not too much but still enough to get the sink hot!
The voltage makes no difference. 5A is still 5A.
you are right brain fart
@Nca78 Yes, I was actually thinking using DIP switch (or even more easy to read thumbwheel switch) to give a unique ID to each node! As soon as I receive the extra radio modules I ordered, I'll test that.
@Grubstake I'm afraid you're right! But it's ok to have just a few days of battery life. As I wrote, it might be often disassembled and reassembled.
This is a simple, low-cost and quick project that can get a high spouse acceptance factor.
Mirror
Remove the led strip from the aluminum profiles.
Cut the aluminum profiles and the covers to appropriate length. I used a hacksaw to cut profile+cover at the same time to ensure the got the same length.
Cut the led strips at one of the cut points using a side cutter.
Remove the old wires (they are too short to reach the box) and solder new wires.
Put the led strip back inside the aluminum profile. Note that there is a small grove at the back for the strip, this ensures that the strip is close to the profile to maximize cooling.
Glue the profiles to the mirror. I used slow-curing epoxy.
Electronics box
Drill holes in the project box for the switch (6mm) and the potentiometer (6mm should be enough but was too tight so I used 8mm).
Drill a 4mm hole for the wires to the led strips.
Upload the sketch to the Arduino
Connect the Arduino and the battery packs and put them inside the project box.
Fasten the project box using double-sided tape.
Big thanks to my wife for letting me use the action photo.