Thanks for the reply. I am not looking to use an LCD, although that may be the best solution. For now, I plan on creating a simple set of LEDs and buttons.
I have looked over the code, and was wondering which part of the code is retrieving the status of a sensor? What if I have multiple motion sensors, how would I retrieve each unique value?
this kind of optic fiber is probably only plastic so for a full DIY , you can use also fishing wire with a big power led or an old chistmass tree optic fiber lighted.....
Not yet !
In fact, the interrupt must be short enough and fast enough to be sure to not miss the RFM69 interrupts.
The code for 8 dimmers will not be really more complicated : in fact, each time we got a zero cross, we must set a timer to zero, and then wait the good amount of milliseconds to turn on the needed outputs.
So, yes, we'll have an interrupts each 10ms (each time the wave crosses the zero, to be precise !), but I think all we have to do in the interrupt handler is set the timer to zero (or to micros() ...) and then on the main loop, wait the good amount of time for each output before setting them ON.
Seems simple on paper, perhaps it will not work on the chip....
In facts, my main concern is : will the RFM interrupt be short enough to not disturb the zero crossing interrupt ?
Although, not yet tested the RFM : do we NEED the interrupt pin ? Can't we poll frequently the RFM?
I've updated the docs at home-assistant.io with sketch examples. Look at the light example.
https://home-assistant.io/components/light.mysensors/#example-sketch
It's what I used for testing during development. It adds an RGB sensor/actuator also besides a dimmer, but you can just remove any references to rgb in the sketch.
The dimmer slider will only be visible after turning on the light and clicking the entity in the gui to bring up the more info card.
I didn't think the voltage drop would make enough of a difference to notice, but i guess it does. I might have to research and look for a more efficient Mosfet.
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.