Expand description
ADI Ports & Devices
This module provides abstractions for devices connected through VEX’s Analog/Digital Interface (ADI) ports, also known as the “three-wire ports” or “triports”.
§Hardware Overview
The V5 Brain features 8 three-wire connector ports on its left side that allow connecting simple analog and digital devices to the brain. These commonly include VEX’s legacy sensors and motors that plugged into the old Cortex microcontroller.
ADI ports can also be found on the AdiExpander
device, which grants you eight additional
ports at the cost of a Smart port.
ADI ports are capable of digital input (3.3V logic), 12-bit analog input, digital output, and 8-bit PWM output. Each port has a dedicated 12-bit Analog-to-Digital Converter (ADC) to allow for analog sensors to send a range of values to the port. There is no DAC, making equivalent analog output impossible. ADI has a max voltage of 5V.
§Update Times
All ADI devices are updated at a fixed interval of 10ms (100Hz), defined by ADI_UPDATE_INTERVAL
.
Re-exports§
pub use accelerometer::AdiAccelerometer;
pub use accelerometer::Sensitivity;
pub use analog::AdiAnalogIn;
pub use digital::AdiDigitalIn;
pub use digital::AdiDigitalOut;
pub use encoder::AdiEncoder;
pub use gyroscope::AdiGyroscope;
pub use light_sensor::AdiLightSensor;
pub use line_tracker::AdiLineTracker;
pub use motor::AdiMotor;
pub use potentiometer::AdiPotentiometer;
pub use potentiometer::PotentiometerType;
pub use pwm::AdiPwmOut;
pub use range_finder::AdiRangeFinder;
pub use servo::AdiServo;
Modules§
- accelerometer
- ADI Accelerometer
- addrled
- ADI Addressable LEDs
- analog
- ADI Analog Interfaces
- digital
- ADI Digital I/O
- encoder
- ADI Optical Shaft Encoder
- gyroscope
- ADI gyroscope device.
- light_
sensor - ADI Light Sensor
- line_
tracker - ADI Line Tracker
- motor
- ADI Motor Controller
- potentiometer
- ADI Potentiometer
- pwm
- ADI Pulse-width Modulation (PWM)
- range_
finder - ADI Ultrasonic Range Finder
- servo
- ADI Servo
Structs§
- AdiPort
- Represents an ADI (three wire) port on a V5 Brain or V5 Three Wire Expander.
Enums§
- AdiDevice
Type - Represents a possible type of device that can be registered on a
AdiPort
.
Constants§
- ADI_
UPDATE_ INTERVAL - Update rate for all ADI devices and ports.
Traits§
- AdiDevice
- Common functionality for a ADI (three-wire) devices.