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
switch [2020/04/09 20:44]
arthur
switch [2021/02/22 17:59] (current)
Line 3: Line 3:
 The Switch module takes care of basic input from things like buttons and switches and controls simple devices like fans and pumps. The Switch module takes care of basic input from things like buttons and switches and controls simple devices like fans and pumps.
  
-It is an incredibly versatile tool that allows you to setup a lot of on-off type systems. It listens to inputs or custom G/M-codes, and outputs to GPIO pins or outputs custom G/M-codes.+It is an incredibly versatile tool that allows you to setup a lot of on-off type systems. It listens to input pins and outputs custom G/M-codes or accepts custom G/M-codes and set outputs to GPIO pins.
  
 This allows you to do one of the following : This allows you to do one of the following :
-* Make a G-code control GPIO pin +* Make a G-code control an output GPIO pin 
-* Make a GPIO pin cause a G-code to be executed +* Make a GPIO input pin cause a G/M-code to be executed 
-* Make a GPIO pin control another GPIO pin+* Make a GPIO pin control another GPIO pin (this may not work anymore)
  
  
Line 124: Line 124:
 # Switch module for fan control # Switch module for fan control
 switch.fan.enable                            true             # Enable this module switch.fan.enable                            true             # Enable this module
-switch.fan.input_on_command                  M106             # This switch is turned on when M106 is sent+switch.fan.input_on_command                  M106             # This switch is turned on when M106 is sent
 switch.fan.input_off_command                 M107             # This switch is turned off when M107 is sent switch.fan.input_off_command                 M107             # This switch is turned off when M107 is sent
 switch.fan.output_pin                        2.6              # This pin is turned on when this switch is turned on, and vice-versa switch.fan.output_pin                        2.6              # This pin is turned on when this switch is turned on, and vice-versa
Line 296: Line 296:
 For wiring, simply wire pin 1.31 to the enable pin of the first stepper driver and pin 1.30 to the enable pin of the second stepper driver.  For wiring, simply wire pin 1.31 to the enable pin of the first stepper driver and pin 1.30 to the enable pin of the second stepper driver. 
  
-Wiring the same way you'd wire step and direction signals in the [http://smoothieware.org/general-appendixes#external-drivers|external drivers documentation]. ( note that if you will be using Open-Drain wiring, you need to add "o!" to your pin numbers, same as for step and dir ).+Wiring the same way you'd wire step and direction signals in the [[http://smoothieware.org/general-appendixes#external-drivers|external|drivers documentation]]. ( note that if you will be using Open-Drain wiring, you need to add "o!" to your pin numbers, same as for step and dir ).
  
 You also need to wire the endstops so that a trigger is detected when *either* is triggered. This means if your endstops are wired as NC, you wire them in series, and if they are wiride as NO, you wire them in parralel. You also need to wire the endstops so that a trigger is detected when *either* is triggered. This means if your endstops are wired as NC, you wire them in series, and if they are wiride as NO, you wire them in parralel.