rotaryAnalog

All rotaryAnalog functions are for 12-position switches. The most common are 8, 10, 12 and 16 positions - with 12 being the most common. These functions can be edited without too much hassle to match larger numbers of positions.

For fewer than 12 positions, simply use a dummy value for the unused positions, a value the switch will never be close to reaching. For instance:

rotaryAnalogSimple(2, 58, 209, 342, 462, 565, 680, 848, 1023, 10000, 10000, 10000, 10000, false); Here, a 8 position switch is used, and the last 4 positions are given the value "10 000".

All rotary switch functions require you to read out the voltage comming from the switch in all its positions. The one exception is rotaryAnalog2ModeShort(), which is a version of rotaryAnalog2Mode (the most used rotary switch function) that will assume the voltages in the 12 positions of the swich. This makes the function a lot easier to use.

rotaryAnalog()

Setup with several switch modes, including a hybrid switch. You can set the amount of positions of the hybrid switch to any number.

Modes:

  • 0: 12-position switch. Absolute.

  • 1: Incremental

  • 2: Open hybrid, X positions

  • 3: Closed hybrid

Uses the rotary field for field placement. Since is has 4 modes it uses 2 slots in the field.

rotaryAnalogSimple()

12 - position switch. Absolute.

rotaryAnalogMute()

12 - position switch. Absolute.

Produces no button presses, but the position of the switch is still detected by the firmware and can be used for conditional coding or rotaryInject.

rotaryAnalogPartial()

12 - position switch. Absolute.

Mix between rotaryAnalogSimle() and rotaryAnalogMute(). You can select a range of positions which will be muted. The remaining positions will produce a button press. The position of the switch is still detected in the muted positions and can be used for conditional coding or rotaryInject.

rotaryAnalog2Mode()

Setup with 2 switch modes.

Modes:

  • 0: 12 - position switch. Absolute.

  • 1: Incremental

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

rotaryAnalog2ModeShort()

Setup with 2 switch modes. This funtion does not require you to record any values from your switch to set up.

Modes:

  • 0: 12 - position switch. Absolute.

  • 1: Incremental

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

rotaryAnalogBite()

Setup with 2 switch modes. Identical to rotaryAnalog2Mode(), but with the option to set the bitepoint together with a biteButton().

Modes:

  • 0: 12 - position switch. Absolute.

  • 1: Incremental

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

Last updated