Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Controlling LED light's Fan2 external momentary switch

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    2
    3
    168
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • matej1006undefined
      matej1006
      last edited by

      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.

      Matej

      1 Reply Last reply Reply Quote 0
      • matej1006undefined
        matej1006
        last edited by matej1006

        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:

        ;trigger2.g
        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?

        1 Reply Last reply Reply Quote 0
        • appjawsundefined
          appjaws
          last edited by

          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

          appjaws - Core XYUV Duet Ethernet Duex5
          firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
          Ormerod 1-converted to laser engraver, Duet wifi
          OpenSCAD version 2024.03.18
          Simplify3D 5.1.2

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA