Module adi

Module adi 

Source

Constants§

E_ADI_ANALOG_IN
E_ADI_ANALOG_OUT
E_ADI_DIGITAL_IN
E_ADI_DIGITAL_OUT
E_ADI_ERR
E_ADI_LEGACY_ENCODER
E_ADI_LEGACY_GYRO
E_ADI_LEGACY_PWM
E_ADI_LEGACY_SERVO
E_ADI_LEGACY_ULTRASONIC
E_ADI_POT_EDR
E_ADI_POT_V2
E_ADI_TYPE_UNDEFINED
HIGH
INPUT
INPUT_ANALOG
INTERNAL_ADI_PORT
LOW
NUM_ADI_PORTS
OUTPUT
OUTPUT_ANALOG

Functions§

adi_analog_calibrate
Calibrates the analog sensor on the specified port and returns the new calibration value.
adi_analog_read
Gets the 12-bit value of the specified port.
adi_analog_read_calibrated
Gets the 12 bit calibrated value of an analog input port.
adi_analog_read_calibrated_HR
Gets the 16 bit calibrated value of an analog input port.
adi_digital_get_new_press
Gets a rising-edge case for a digital button press.
adi_digital_read
Gets the digital value (1 or 0) of a port configured as a digital input.
adi_digital_write
Sets the digital value (1 or 0) of a port configured as a digital output.
adi_encoder_get
Gets the number of ticks recorded by the encoder.
adi_encoder_init
Creates an encoder object and configures the specified ports accordingly.
adi_encoder_reset
Sets the encoder value to zero.
adi_encoder_shutdown
Disables the encoder and voids the configuration on its ports.
adi_gyro_get
Gets the current gyro angle in tenths of a degree. Unless a multiplier is applied to the gyro, the return value will be a whole number representing the number of degrees of rotation times 10.
adi_gyro_init
Initializes a gyroscope on the given port. If the given port has not previously been configured as a gyro, then this function starts a 1300 ms calibration period.
adi_gyro_reset
Resets the gyroscope value to zero.
adi_gyro_shutdown
Disables the gyro and voids the configuration on its port.
adi_led_clear_all
@brief Clear the entire led strip of color
adi_led_clear_pixel
@brief Clear the entire led strip of color
adi_led_init
Initializes a led on the given port of the original led.
adi_led_set
@brief Set the entire led strip using the colors contained in the buffer
adi_led_set_all
@brief Set the entire led strip to one color
adi_led_set_pixel
@brief Set one pixel on the led strip
adi_motor_get
Gets the last set speed of the motor on the given port.
adi_motor_set
Sets the speed of the motor on the given port.
adi_motor_stop
Stops the motor on the given port.
adi_pin_mode
Configures the port as an input or output with a variety of settings.
adi_port_get_config
Gets the configuration for the given ADI port.
adi_port_get_value
Gets the value for the given ADI port.
adi_port_set_config
Configures an ADI port to act as a given sensor type.
adi_port_set_value
Sets the value for the given ADI port.
adi_potentiometer_get_angle
Gets the current potentiometer angle in tenths of a degree.
adi_potentiometer_init
Initializes a potentiometer on the given port of the original potentiometer.
adi_potentiometer_type_init
Initializes a potentiometer on the given port.
adi_ultrasonic_get
Gets the current ultrasonic sensor value in centimeters.
adi_ultrasonic_init
Creates an ultrasonic object and configures the specified ports accordingly.
adi_ultrasonic_shutdown
Disables the ultrasonic sensor and voids the configuration on its ports.

Type Aliases§

adi_encoder_t
Reference type for an initialized encoder.
adi_gyro_t
Reference type for an initialized gyroscope.
adi_led_t
Reference type for an initialized addressable led.
adi_port_config_e_t
Represents the port type for an ADI port.
adi_potentiometer_t
Reference type for an initialized potentiometer.
adi_potentiometer_type_e_t
Represents the potentiometer version type.
adi_ultrasonic_t
Reference type for an initialized ultrasonic.