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: Through switch functions
  • 2: Direct control
  1. 4. Connect to SimHub
  2. Controller settings and properties

How to control it?

PreviousHow does it work?NextProperty list

Last updated 4 months ago

How can you have an impact on what it sent through ?

1: Through switch functions

As mentioned in the previous chapter, many switch functions will automatically send info to pre-defined slots in the fields. Such as current preset selected is sent to buttonField bits 11-14 (or 10-13 if we're being strict, but in DDC we're not counting from 0 to be more user friendly). Using 4 bits, we can make a number between 0 and 15. DDC being capped at 12 presets will need 4 bits to express this number. 3 bits would only get us to 7.

If you have dual clutches set up, you're already getting info on:

  • Bite button pressed

  • Dual clutch modes

  • Bite point setting sequence

  • Clutch calibration active

Some switch functions however, does not have a reserved slot in any of the fields. You'll have to select a slot in one of the fields when you use that function in 30_Switches. For instance . This function lets you use a rotary switch as an absolute 12-position switch OR as a pulsing incremental switch. You can swap between these two settings, and you'll send info to rotaryField about which mode you're in. 0 is for 12-position mode, 1 is for incremental mode. This function only needs one bit in the field. This function forces you to use rotaryField, others will force you to use buttonField. I've tried to balance this out so you'll end up using both and having enough bits to use.

2: Direct control

You can manipulate values in the bit fields directly by using . Editors are functions that lets you manually change a lot of things running under the hood. This moves us over to the more advanced parts of DDC, but it unlocks a whole bunch of possibilities for creative minds.

The functions and can be used in 30_Switches to edit the fields however you like.

editors
sendToButtonField()
sendToRotaryField()
these two 16-bit fields
rotaryAnalog2Modes()