Raspberry Pi Examples
This section provides example code for several common VMX applications to add sophisticated control, navigation and vision processing-related capabilities:
| Example | Description |
| Analog Inputs | Retrieves analog voltage values from 4 Analog Input Channels |
| CAN Bus Monitor | Retrieves and displays received CAN messages |
| CAN TX Loopback | Transmits CAN messages and receives those same messages |
| Digital Inputs | Retrieves High/Low state from all possible Digital Input Channels |
| Digital Outputs | Toggles the High/Low state of all possible Digital Output Channels |
| Encoders | Retrieves latest encoder count/direction from all possible Quadrature Encoder Input Channels |
| I2C | Transmits/Receives data over the VMX I2C interface |
| IMU | Displays real-time orientation data (Pitch/Yaw/Roll) from the VMX IMU |
| Interrupts | Handles interrupts on High/Low signal state transitions on all possible Interrupt-source Channels |
| PWM Generation | Generates PWM signals on all possible PWM Generator Channels |
| Real-time Clock (RTC) | Retrieves/Updates the VMX Real-time Clock, synhronizes with Raspberry Pi system time/date |
| SPI | Transmits/Receives data over the VMX SPI Interface |
| UART | Transmits/Receives data over the VMX UART interface |
| VMX Configuration | Retrieves/displays the current VMX configuration data |
RoboRIO (FRC) Examples
To access VMX from a FRC RoboRIO-based system, select the USB interface option available in the navX-MXP RoboRIO libraries.
Each example includes C++, Java and LabVIEW samples.