Skip to content

Instantly share code, notes, and snippets.

View logxen's full-sized avatar

Logxen logxen

View GitHub Profile
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