Class fx_switch¶
Defined in File dreammakerfx.h
Class Documentation¶
-
class
fx_switch
¶ These functions are used to control the toggle switches on the pedal.
The switches, which are available on the second generation hardware, are part of the
pedal
object. The available switches arepedal.toggle_left
andpedal.toggle_right
.void loop() { // When the user changes the left toggle switch, change the color of the LED if (pedal.toggle_left.has_changed()) { if (pedal.toggle_left.position == SWITCH_POS_UP) { pedal.led_left.turn_on(RED); } else if (pedal.toggle_left.position == SWITCH_POS_MIDDLE) { pedal.led_left.turn_on(GREEN); } else if (pedal.toggle_left.position == SWITCH_POS_DOWN) { pedal.led_left.turn_on(BLUE); } } // Other code in loop()... }
Public Members
-
SWITCH_POS
position
¶ Current switch position (
SWITCH_POS_UP
,SWITCH_POS_MIDDLE
,SWITCH_POS_DOWN
)
-
SWITCH_POS