Place to put your Basic demos and examples

Moderator: Mmiscool

User avatar
By forlotto
#34252 currently it only does a LED my fault really I asked for an AC LED Bulb Dimmer Code Example and this was the code I was referred to though I was not all that clear and I had a lot of questions at the time we talked so no fault of mmiscool I totally take the blame for this one I posted it...

But currently I have a board on order that I will be testing with and I will update this post on status and add it as a project as time permits .

Apologies for this misunderstanding.
I will warn you though I won't be seeing the board till roughly the end of next month at the earliest it is coming via slow boat.

FOR NOW THIS WILL WORK FOR SMALL DC LED that is all nothing more.
There may be a need for more code as specified to handle zero cross detection I really cannot say for certain without a test. For my test I will be using a module and a regular LED bulb (which is not supposed to work but I want to test anyways) I also will be using a dimmer approved ccfl to see just how everything pans out. I plan not to go below the 10% threshold on the LED bub the point of flicker. From what I can tell just from reading product sheets and such if the light is dimmer approved it is supposed to work with most dimmer setups however I cannot make any promises all that I can say is that I will post results of my tests and move on from there.

In the mean time if anyone thinks they can beat me to the chase by all means please do while I am semi technically inclined I am sure there are many more suited with a bit more between the ears for this project honestly I would prefer it as I may miss something.

Code: Select alllightLevel = 0
slider lightLevel 0 1023
button "Set Light" [setLight]
wait

[setLight]
pwo 2 lightLevel
wait
Last edited by forlotto on Thu Nov 26, 2015 2:24 pm, edited 1 time in total.
User avatar
By Mmiscool
#34987 If you hook an led to gpio 2 it will dim using the slider in the web browser.