Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
switch [2019/04/08 17:04]
wolfmanjm [Spindle control button]
switch [2019/04/13 17:54]
wolfmanjm
Line 50: Line 50:
 switch.fan1.startup_value ​                127 switch.fan1.startup_value ​                127
 </​code>​ </​code>​
 +
 +==== Input and Output Pins
 +**NOTE** a switch can have either an input pin defined or an output pin but not both.
 +If for some reason you needed an input pin to control one or more output pins you could define two (or more) switches, one input and one or more outputs. Then the input pin would define the M-codes that turn on/off the output pins in its output_on_command (and/or its output_off_command).
  
 ==== Input Pin ==== Input Pin
Line 139: Line 143:
 switch.servo.output_type ​                      ​swpwm ​           # Software pwm output settable with S parameter in the input_on_command switch.servo.output_type ​                      ​swpwm ​           # Software pwm output settable with S parameter in the input_on_command
 #​switch.servo.pwm_period_ms ​                   20               # set period to 20ms (50Hz) default is 50Hz #​switch.servo.pwm_period_ms ​                   20               # set period to 20ms (50Hz) default is 50Hz
-#​switch.servo.startup_state ​                   ​true             to enable ​startup_value+#​switch.servo.startup_state ​                   ​false            ​false uses startup_value ​on boot true uses default_on_value
 #​switch.servo.startup_value ​                   7.43             # On boot and HALT it will set this PWM value #​switch.servo.startup_value ​                   7.43             # On boot and HALT it will set this PWM value
 +#​switch.servo.default_on_value ​                ​3.3 ​             # This PWM value will be set if M280 doe snot have an S parameter, it is also the value used if startup_state is true
 </​code>​ </​code>​