DDC
  • Welcome
    • Introduction
    • Supported hardware
  • 1: Project planning
    • Switch inputs
      • Switch table
      • Direct
      • Shift register
      • Port expander
    • Analog inputs
      • External ADC
    • RGB LED
    • Digital outputs
    • PWM / Circuit control
    • EEPROM
    • Processing and memory
  • 2. Wiring
    • Switch inputs
      • Matrix
      • Direct
      • Shift register
      • Port expander
    • Analog
      • Analog switches
      • External ADC
    • RGB LED
    • Digital outputs
    • PWM / Circuit control
    • EEPROM
  • 3. Coding
    • Essentials
      • 02_Board.ino
      • 08_Joystick
      • 10_TableAndAnalog.ino
        • Switch table
        • Analog channels
      • 30_Switches.ino
    • Peripherals
      • RGB LED
        • Firmware control
          • LED functions
          • Color
          • Brightness
          • Presets
        • SimHub control
      • Digital outputs
        • Setup
        • SimHub control
        • Firmware control
      • PWM / Circuit control
        • Setup
        • Calibrate
        • Switch control
        • Trigger control
      • Shift register
      • I2C devices
        • ADS1115
        • PCA9555
        • CAT24C512
    • Advanced
      • Analog inject
      • Conditional coding
        • Triggers
        • Editors
      • Field placement
      • Presets
        • 31_RunningPresets.ino
        • 32_Presets.ino
        • Example
    • Upload
    • Naming the controller
  • 4. Connect to SimHub
    • LED control
    • Controller settings and properties
      • How to connect?
      • How does it work?
      • How to control it?
      • Property list
  • Switch library
    • Pushbutton
    • Function switches
    • Toggle switches
    • Hat switches
    • Car control functions
      • QuickSwitch
      • BrakeMagic
      • ThrottleHold
      • Handbrake
    • Pedals & paddles
      • Brake/throttle
      • Clutch
      • Bite point & launch
      • Filtered curves
      • Shifter
    • Funky switch
      • Directional
      • Center push
    • Encoders
      • rotary2Bit
      • rotary4Bit
      • funkyRotary
      • wildEncoder
      • E18
      • rotaryPulse
      • PEC11
    • Rotary switches
      • rotaryAnalog
      • quickRotary
      • SW1
      • Editing functions
    • Multiswitch complexes
      • Hybrid rotary
      • Multifunction rotary
      • Modded encoder
      • Stacked encoder
    • Preset
    • DDS
    • RGB LED control
    • PWM / Circuit control
    • Utility
  • Fast DDC
    • Buttons and LED
    • 4 encoders, buttons and LED
    • Dual clutches, 4 encoders, buttons and LED
    • Dual clutches, 6 encoders, button matrix and LED
  • CB1
    • Ordering
      • Order together
      • Order yourself
        • 1. Open in EasyEDA
        • 2. Export files
        • 3. Edit Pick&Place
        • 4. Pin headers and jumper
        • 5. Order from JLCPCB
    • Wiring
    • Code
      • Essentials
      • Complete project
      • Settings
    • Circuit
    • Shields
      • Robin
  • Collaboration
Powered by GitBook
On this page
  1. Switch library
  2. Rotary switches

quickRotary

PreviousrotaryAnalogNextSW1

Last updated 1 year ago

The quickRotary functions are part of the QuickSwitch system explained

quickRotary1Bite()

A switch with 2 modes. In 12 - position mode this switchs' position will be overridden by quickSwitch() and quickSwitch12().

Modes:

  • 0: 12 - position switch. Absolute.

  • 1: Incremental

Uses the rotary field for Since is has 2 modes it uses 1 slot in the field.

In addition, this switch can set the bite point of your clutches. Works in combination with The button presses will not trigger when setting bite point.

void quickRotary1Bite(int analogChannel, int fieldPlacement, int pos1, int pos2, int pos3, int pos4, int pos5, int pos6, int pos7, int pos8, int pos9, int pos10, int pos11, int pos12, bool reverse)

Switch setup with explainations:

quickRotary1Bite(

2, <- analog channel

1, <- placement in rotary field

16, 107, 200, 291, 383, 474, 566, 657, 749, 841, 932, 1023, <- Switch position values

false); <- Direction is not reversed, so CW rotation increasese button number.

  • Field placement to 1 in the rotary field, so [DahlDesign.DDCR1] will show the modes.

  • The starting number of the 12-position mode is determined by the number set in the block for analogButtonNumber[]. The number for incremental mode is determined by the number set in the block for analogButtonNumberIncMode[].

  • This switch has "reverse" set to true, which can be a good idea if it is placed horizontally on the right side. Turning it CCW will now increase the count instead of reducing.

So typed out in 30_Switches.ino:

quickRotary1Bite(2, 1, 16, 107, 200, 291, 383, 474, 566, 657, 749, 841, 932, 1023, false);

  • modButton() if you want to change modes freely. modButton() not needed to change modes across presets.

  • Minimum 12 button numbers.

  • One slot in the rotary field.

  • quickSwitch() or quickSwitch12() button to override position.

  • biteButton() to set bite point.

quickRotary2()

A switch with 2 modes. In 12 - position mode this switchs' position will be overridden by quickSwitch() and quickSwitch12().

Modes:

  • 0: 12 - position switch. Absolute.

  • 1: Incremental

Uses the rotary field for Since is has 2 modes it uses 1 slot in the field.

void quickRotary2(int analogChannel, int fieldPlacement, int pos1, int pos2, int pos3, int pos4, int pos5, int pos6, int pos7, int pos8, int pos9, int pos10, int pos11, int pos12, bool reverse)

Switch setup with explainations:

quickRotary2(

2, <- analog channel

1, <- placement in rotary field

16, 107, 200, 291, 383, 474, 566, 657, 749, 841, 932, 1023, <- Switch position values

false); <- Direction is not reversed, so CW rotation increasese button number.

  • Field placement to 1 in the rotary field, so [DahlDesign.DDCR1] will show the modes.

  • The starting number of the 12-position mode is determined by the number set in the block for analogButtonNumber[]. The number for incremental mode is determined by the number set in the block for analogButtonNumberIncMode[].

  • This switch has "reverse" set to true, which can be a good idea if it is placed horizontally on the right side. Turning it CCW will now increase the count instead of reducing.

So typed out in 30_Switches.ino:

quickRotary2(2, 1, 16, 107, 200, 291, 383, 474, 566, 657, 749, 841, 932, 1023, false);

  • modButton() if you want to change modes freely. modButton() not needed to change modes across presets.

  • Minimum 12 button numbers.

  • One slot in the rotary field.

  • quickSwitch() or quickSwitch12() button to override position.

quickRotary3()

A switch with 2 modes. In 12 - position mode this switchs' position will be overridden by quickSwitch() and quickSwitch34().

Modes:

  • 0: 12 - position switch. Absolute.

  • 1: Incremental

Uses the rotary field for Since is has 2 modes it uses 1 slot in the field.

void quickRotary3(int analogChannel, int fieldPlacement, int pos1, int pos2, int pos3, int pos4, int pos5, int pos6, int pos7, int pos8, int pos9, int pos10, int pos11, int pos12, bool reverse)

Switch setup with explainations:

quickRotary3(

2, <- analog channel

1, <- placement in rotary field

16, 107, 200, 291, 383, 474, 566, 657, 749, 841, 932, 1023, <- Switch position values

false); <- Direction is not reversed, so CW rotation increasese button number.

  • Field placement to 1 in the rotary field, so [DahlDesign.DDCR1] will show the modes.

  • The starting number of the 12-position mode is determined by the number set in the block for analogButtonNumber[]. The number for incremental mode is determined by the number set in the block for analogButtonNumberIncMode[].

  • This switch has "reverse" set to true, which can be a good idea if it is placed horizontally on the right side. Turning it CCW will now increase the count instead of reducing.

So typed out in 30_Switches.ino:

quickRotary33(2, 1, 16, 107, 200, 291, 383, 474, 566, 657, 749, 841, 932, 1023, false);

  • modButton() if you want to change modes freely. modButton() not needed to change modes across presets.

  • Minimum 12 button numbers.

  • One slot in the rotary field.

  • quickSwitch() or quickSwitch34() button to override position.

quickRotary4()

A switch with 2 modes. In 12 - position mode this switchs' position will be overridden by quickSwitch() and quickSwitch34().

Modes:

  • 0: 12 - position switch. Absolute.

  • 1: Incremental

void quickRotary4(int analogChannel, int fieldPlacement, int pos1, int pos2, int pos3, int pos4, int pos5, int pos6, int pos7, int pos8, int pos9, int pos10, int pos11, int pos12, bool reverse)

Switch setup with explainations:

quickRotary4(

2, <- analog channel

1, <- placement in rotary field

16, 107, 200, 291, 383, 474, 566, 657, 749, 841, 932, 1023, <- Switch position values

false); <- Direction is not reversed, so CW rotation increasese button number.

  • Field placement to 1 in the rotary field, so [DahlDesign.DDCR1] will show the modes.

  • The starting number of the 12-position mode is determined by the number set in the block for analogButtonNumber[]. The number for incremental mode is determined by the number set in the block for analogButtonNumberIncMode[].

  • This switch has "reverse" set to true, which can be a good idea if it is placed horizontally on the right side. Turning it CCW will now increase the count instead of reducing.

So typed out in 30_Switches.ino:

quickRotary4(2, 1, 16, 107, 200, 291, 383, 474, 566, 657, 749, 841, 932, 1023, false);

  • modButton() if you want to change modes freely. modButton() not needed to change modes across presets.

  • Minimum 12 button numbers.

  • One slot in the rotary field.

  • quickSwitch() or quickSwitch34() button to override position.

Uses the rotary field for Since is has 2 modes it uses 1 slot in the field.

field placement.
here.
field placement.
field placement.
field placement.
biteButton().