Skip to content

Instantly share code, notes, and snippets.

@logxen
Created June 1, 2013 14:06
Show Gist options
  • Save logxen/5690504 to your computer and use it in GitHub Desktop.
Save logxen/5690504 to your computer and use it in GitHub Desktop.
switch.fan1.enable true # this tells Smoothie to create a new switch named "fan1"
switch.fan1.startup_state false # this sets the initial state of the switch
switch.fan1.input_pin 2.11 # watch for changes on this pin
switch.fan1.input_pin_behavior toggle # valid options are "toggle" and "momentary"
switch.fan1.input_on_command M106 # any command that starts with this exact string turns this switch on
switch.fan1.input_off_command M107 # any command starting with this exact string turns off the switch
switch.fan1.output_pin 2.12! # this pin will follow the state of the switch
#switch.fan1.output_on_command M106 # this command is sent whenever the switch turns on
#switch.fan1.output_off_command M107 # this command is sent whenever the switch turns off
switch.zplus10.enable true
switch.zplus10.input_pin 0.1
switch.zplus10.input_pin_behavior momentary
switch.zplus10.output_on_command G91 G1 Z10 G90 # G91 and G90 toggle to relative positioning and back to absolute
switch.zminus10.enable true
etc...
TODO:
- input_pins (multiple input pins with individual behaviors)
- output_pins (multiple output pins)
- input_x_commands (?) (multiple input commands)
- analog input_pin_behavior (read analog pins)
- input_x_command parameter (ex. M106 S100 to set analog value)
- analog state, up down input_pin_behavior (move state from binary to float)
- analog output_pin_behavior (add output_pin behaviors and some sigma-delta)
- output_x_command parameter (so switch can generate an M106 S100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment