Controlling LED light's Fan2 external momentary switch

  • Hello,

    i would like to use fan2 for controling my 12V DC LED cob lights. and i want to control when are on with external momentary switch and with buttom on web interface. momentary switch i have connected to 5v and to GPIO1.
    I was looking at the g-code to be able to figurit out but with out succes . please help.


  • Hello, @dc42 please help

    i have for now wrote that
    on weree nd of program
    external momentary switch i have connected to 5V and GPIO1

    ; Controling LED COB lights
    M950 P7 C"duex.fan8" Q0 
    M950 J1 C"duex.gp1"
    M581 P1 S1 T2 C0 

    and this is in trigger2.g in macros:

    M42 P7 S1

    one more question is than between printing possible to use macros or this external momentary switch to turn led on or off?

  • You originally said that Fan2 would control the cob lights. This would give you a button and value slider on DWP
    Fan2 is on the main board not the expansion.
    M950 F2 C"Fan2" Q500 ; create System fan on pin fan2 and set its frequency
    M106 P2 C"Cob Light" ; set System fan. Thermostatic electronics cooling

    Hope that helps, not sure how to trigger from a momentary switch though

Log in to reply