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. Encoders

funkyRotary

Previousrotary4BitNextwildEncoder

Last updated 8 months ago

Encoder functions in the funkyRotary category. Information on this category

In contrast to the other encoder functions, the funkyRotary category requires you to type in the column numbers for both A and B pin columns. This means you can place them on any column number on the same row.

funkyRotary()

Standard incremental encoder setup. Rotating CW will give a button pulse, rotating CCW will give a button pulse with a button number 1 value higher.

void funkyRotary(int Arow, int Acol, int Bcol, bool reverse)

For an encoder with pins A and B to columns 3 and 4. Common pin to row 2:

funkyRotary(2, 3, 4, false);

The "reverse" input is to flip what happens on CW and CCW rotation. Here set to false. Set to true to flip.

The button numbers used is determined by the number written in the block for the A pin. B pin block will not be read. If button number was set to 15, the switch will use buttons 15 and 16.

  • 2 button numbers

funkyBite()

Standard incremental encoder setup. Rotating CW will give a button pulse, rotating CCW will give a button pulse with a button number 1 value higher.

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 funkyBite(int row, int Acol, int Bcol, bool reverse)

For an encoder with pins A and B to columns 3 and 4. Common pin to row 2:

funkyBite(2, 3, 4, false);

The button numbers used is determined by the number written in the block for the A pin. B pin block will not be read. If button number was set to 15, the switch will use buttons 15 and 16. The reverse part of the function will switch the button numbers and increase/decrease bite point if set to true.

  • 2 button numbers

  • biteButton() to set bite point

funkyBiteAdjust()

Similar to rotary2Bite above, but instead of changing bitePoint by going through the bite point setting sequence, it will directly increase (CW rotation) or decrease (CCW rotation) the bitepoint by a set amount while biteButton is held.

void funkyBiteAdjust(int row, int Acol, int Bcol, bool reverse, int increment)

For an encoder with pins A and B to columns 3 and 4. Common pin to row 2:

funkyBiteAdjust(2, 3, 4, false, 50);

The button numbers used is determined by the number written in the block for the A pin. B pin block will not be read. If button number was set to 15, the switch will use buttons 15 and 16. The reverse part of the function will switch the button numbers and increase/decrease bite point if set to true.

When the biteButton() is held, this encoder will increase/decrease the bite point by 5.0%.

  • 2 button numbers

  • biteButton() to set bite point

funkyThrottle()

Standard incremental encoder setup. Rotating CW will give a button pulse, rotating CCW will give a button pulse with a button number 1 value higher.

In addition, this switch can set the throttle hold value when the is held.. The button presses will not trigger when setting throttle hold value. Adjustments will be with 1% increments.

void funkyThrottle(int row, int Acol, int Bcol, bool reverse)

For an encoder with pins A and B to columns 3 and 4. Common pin to row 2:

funkyThrottle(2, 3, 4, false);

The button numbers used is determined by the number written in the block for the A pin. B pin block will not be read. If button number was set to 15, the switch will use buttons 15 and 16. The reverse part of the function will switch the button numbers and increase/decrease bite point if set to true.

When the modButton() is held, this encoder will increase/decrease the throttle hold value by 1.0%.

  • 2 button numbers

  • modButton()

funkyBrake()

Standard incremental encoder setup. Rotating CW will give a button pulse, rotating CCW will give a button pulse with a button number 1 value higher.

In addition, this switch can set the brake magic value when the is held.. The button presses will not trigger when setting brake magic value. Adjustments will be with 1% increments.

void funkyBrake(int row, int Acol, int Bcol, bool reverse)

For an encoder with pins A and B to columns 3 and 4. Common pin to row 2:

funkyBrake(2, 3, 4, false);

The button numbers used is determined by the number written in the block for the A pin. B pin block will not be read. If button number was set to 15, the switch will use buttons 15 and 16. The reverse part of the function will switch the button numbers and increase/decrease bite point if set to true.

When the modButton() is held, this encoder will increase/decrease the brake magic value by 1.0%.

  • 2 button numbers

  • modButton()

biteButton().
modButton()
modButton()
here.