com.qualcomm.robotcore.hardware

## Interface AnalogOutputController

- All Superinterfaces:
    HardwareDevice
  All Known Subinterfaces:
    DeviceInterfaceModule

      public interface AnalogOutputController
      extends HardwareDevice

  Interface for working with Analog Controllers

  Different analog input controllers will implement this interface.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `HardwareDevice.Manufacturer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `SerialNumber` | `getSerialNumber()` Serial Number
    `void` | `setAnalogOutputFrequency(int port, int freq)` Sets the channel output frequency in the range 1-5,000 Hz in mode 1, 2 or 3.
    `void` | `setAnalogOutputMode(int port, byte mode)` Sets the channel operating mode.
    `void` | `setAnalogOutputVoltage(int port, int voltage)` Sets the channel output voltage.

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode`

- - ### Method Detail

    - #### getSerialNumber

          SerialNumber getSerialNumber()

      Serial Number
      Returns:
        return the USB serial number of this device

    - #### setAnalogOutputVoltage

          void setAnalogOutputVoltage(int port,
                                      int voltage)

      Sets the channel output voltage. If mode == 0: takes input from -1023-1023, output in the range -4 to +4 volts. If mode == 1, 2, or 3: takes input from 0-1023, output in the range 0 to 8 volts.
      Parameters:
        `port` - channel 0 or 1
        `voltage` - voltage value in the correct range.

    - #### setAnalogOutputFrequency

          void setAnalogOutputFrequency(int port,
                                        int freq)

      Sets the channel output frequency in the range 1-5,000 Hz in mode 1, 2 or 3. If mode 0 is selected, this field will be over-written to 0.
      Parameters:
        `port` - 1 or 0
        `freq` - output frequency in the range1-5,000Hz

    - #### setAnalogOutputMode

          void setAnalogOutputMode(int port,
                                   byte mode)

      Sets the channel operating mode. Mode 0: Voltage output. Range: -4V - 4V Mode 1: Sine wave output. Range: 0 - 8V Mode 2: Square wave output. Range: 0 - 8V Mode 3: Triangle wave output. Range: 0 - 8V
      Parameters:
        `port` - 0 or 1
        `mode` - voltage, sine, square, or triangle