LogoLogo
  • Hello!
  • The Device
    • Device basics
    • Plugging in a module
  • APP
    • Downloading the app
    • Before you start
    • Connecting to The Device
    • Setting a module
    • Using the IMU
    • Logging in / account
    • Checking battery power
    • Renaming the Device
    • Updating the firmware
    • Beacon
  • STARTER PROJECTS
    • Interactive Lighting
    • Touch-Free Music Remote
    • Air Quality Monitor
  • Equations
    • Getting started with equations
    • Equation logic
    • Inputs
    • Outputs
      • Keyboard mode
      • Glow Output & Lighting
        • Fade
        • Dot
        • Arc
        • Rainbow
        • Glitter
      • Cloud Output
    • Sequences
    • Casting an equation
    • Editing & deleting equations
    • Removing an equation
  • API
    • Languages
      • Javascript
      • Python CSV
    • Platforms
      • Unity
        • Windows
        • MacOS
      • TouchDesigner
      • Unreal Engine
    • Streaming
  • Modes
    • Beacon
  • Modules
    • Button
    • Color
    • Dial
    • Digital
    • Distance
    • Environment
    • Flex
    • Force
    • Gesture
    • Glow
    • Joystick
    • Light
    • Motion
    • Move
    • Proximity
    • Slider
    • Sound
    • Spin
    • Thermal
    • Tone
  • Algorithms
    • Orientation
Powered by GitBook
On this page
  • Properties
  • Code
  1. Modules

Dial

Measures the amount of rotational change between two fixed angles.

PreviousColorNextDigital

Last updated 1 year ago

Properties

Name
Data Type
Range

Raw

int

0 - 4095

Degree

int

40 - 330

What does the data mean?

40º corresponds to the dial rotated all the way to its left most point while 330º is the dial's right most point. The dial does not rotate 360º like the spin module.

What ports can I use it on?

1,2,7,8

Code

var degree = Magic.modules.dial.degree;

var raw = Magic.modules.dial.raw.degree;
using Magic;

public class Demo : MonoBehaviour
{
    // create a reference to the module
    public Magic.Modules.DialModule dial;
    
    void Start()
    {
    }
    
    void Update()
    {
        // access the property of the module
        int dialMovement = dial.degree;
    }
}