For a more detailed description please take a look at the Part 1: MPDMv7.5 AC Dimmer devboard overview

MPDMv7.5 AC Dimmer devboard ESP Basic program example for the basic version configuration:

'write("starttimer",10)
cls

'VCNT GPIO pin
let pinNo = 13 
'ON-OFF GPIO pin
let off = 16

io(po,off,0)

' Software option for Light FULL ON at power-up
' working only when the hardware ON-OFF function is activated
'stat = "on"
'let sw = 0

' Software option for Light FULL OFF at power-up
' working only when the hardware ON-OFF function is activated
stat = "off"
let sw = 1

let b1 = 800 
let b2 = 850 
let b3 = 890 
let b4 = 550
let b5 = 650 
let b6 = 750 
let b7 = 850

wprint " <b>MPDMv7 - MAINS AC Dimmer Dev Board <br>demo driver</b><br><i>by tech@esp8266-projects.com</i><br><br> " 
t = 0
timer 300, [start]

print "Control PIN" 
textbox pinNo 
wprint "<br>"
wprint "<br>"
wprint " Brightness" 
textbox b1 
button " Set Brightness ",[Setb1] 
wprint "<br>"
wprint " Brightness" 
textbox b2 
button " Set Brightness ",[Setb2] 
wprint "<br>"
wprint " Brightness" 
textbox b3 
button " Set Brightness ",[Setb3] 
wprint "<br>"
wprint " Brightness" 
textbox b4 
button " Set Brightness ",[Setb4] 
wprint "<br>"
wprint " Brightness" 
textbox b5 
button " Set Brightness ",[Setb5] 
wprint "<br>"
wprint " Brightness" 
textbox b6 
button " Set Brightness ",[Setb6] 
wprint "<br>"
wprint " Brightness" 
textbox b7 
button " Set Brightness ",[Setb7] 
wprint "<br>"

wprint "<br>"
textbox stat
button " ON/OFF ",[off] 
wprint "<i><t> -> Press first for hardware ON/OFF function !!</i><br>"

button " Exit ", [TestExit] 
wait

[start]
io(po,2,0)
delay 100
io(po,2,1)
t = t + 1
if t = 5 then
 timer 0 
end if
wait

[off]
if sw = 0 then
 stat = "off"
 sw = 1
 io(po,off,0)
else 
 stat = "on"
 sw = 0
 io(po,off,1)
endif
wait

[Setb1] 
io(pwo,pinNo,b1)
wait

[Setb2] 
io(pwo,pinNo,b2)
wait

[Setb3] 
io(pwo,pinNo,b3)
wait

[Setb4] 
io(pwo,pinNo,b4)
wait

[Setb5] 
io(pwo,pinNo,b5)
wait

[Setb6] 
io(pwo,pinNo,b6)
wait

[Setb7] 
io(pwo,pinNo,b7)
wait

[TestExit] 
Wprint | <br><br><a href="./edit"> Click here to go to <b>Edit</b> </a> |
end

 

For any new orders/requests please feel free to use as usual: tech at esp8266-projects.com.

MPDMv7.5 Boards are also available on Tindie: AC MAINS Dimmer – MPDMv7.5

————————————————— DISCLAIMER ————————————————–
      WARNING!! You will play with LIVE MAINS!! Deadly zone!! 
 
      If you don’t have any experience and are not qualified for working with MAINS power I will not encourage you to play arround!. The author take no responsibility for any injury or death resulting, directly or indirectly, from your inability to appreciate the hazards of household mains voltages.
   The circuit diagrams are as accurately as possible, but are offered with no guarantees whatsoever. 
    There is no guarantee that this design meets any Rules which may be in force in your country so please check before your local rules/regulations.
—————————————————————————————————————————-
MPDMv7.5 by ESP8266-Projects.com is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
—————————————————————————————————————————

 


Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

AC Dimmer

MPDMv7.5 Arduino IDE driver example

For a more detailed description please take a look at the Part 1: MPDMv7.5 AC Dimmer devboard overview MPDMv7.5 AC Dimmer devboard is also available on Tindie Store A very simple MPDMv7.5 Arduino IDE driver Read more…

AC Dimmer

AC Dimmer DevBoard – MPDMv7.5 – Part 3 – DAC

For a more detailed description please take a look at the Part 1: MPDMv7.5 AC Dimmer devboard overview MPDMv7.5 AC Dimmer devboard ESP Basic program example for the Extra DAC version configuration: address = 96 Read more…

AC Dimmer

AC Dimmer DevBoard – MPDMv7.5 Release!

For any new orders/requests please feel free to use as usual: tech at esp8266-projects.com. MPDMv7.5 Boards are also available on Tindie: AC MAINS Dimmer – MPDMv7.5 ————————————————— DISCLAIMER ————————————————–       WARNING!! You will Read more…