XRP
  • Experiential Robotics Platform (XRP)
    • Building the XRP Robo
    • Programming Raspberry Pi Pico W
    • Programming with XRPCode IDE
    • Programming with wpilib
      • Hardware
      • Imaging and Setup
      • Creating an XRP Program
    • Programming with ROS
  • Hardware Components
    • Different Types of Motors
      • Brushed DC Motors
      • Brushless Motor
      • Stepper Motor
      • Servo Motors
    • Key Characteristics of DC Motors
    • Encoders
  • Motor Control Theory
    • What use in FRC
    • PID control (Proportional-Integral-Derivative control)
    • Field Oriented Control (FOV)
  • Use XRP to practice
    • Plotting Fix
    • Reading from the Encoder
    • Measure position
    • Control the motor
    • Tuning PID
  • Use XRP with Micropython
    • Setup Envirrment
    • Use the Shell
    • XRP library
  • Connect with Wifi
Powered by GitBook
On this page
  1. Experiential Robotics Platform (XRP)

Programming with wpilib

Writing a program for the XRP is very similar to writing a program for a regular FRC robot. All the same tools (Visual Studio Code, Driver Station, SmartDashboard, etc) can be used with the XRP.

WPILib Hardware Support

  • The onboard LED and Pushbutton are exposed as DIO channels 0 and 1

  • 2 motors (left/right) exposed as XRPMotor channels 0/1 (These behave similarly to PWM-based motor controllers)

  • 2 additional motors (motor3/motor4) exposed as XRPMotor channels 2/3

  • 2 servo outputs (servo1/servo2) exposed as XRPServo channels 4/5

  • Encoders for each motor (channel 4/5 for Left, channel 6/7 for Right, channel 8/9 for motor3, channel 10/11 for motor4)

  • 3-axis gyro exposed as XRPGyro

  • The 3-axis accelerometer is exposed as BuiltInAccel

  • Support for XRP reflectance sensor (reporting Left/Right values on Analog 0/1)

  • Support for XRP Rangefinder (reporting values on Analog 2)

PreviousProgramming with XRPCode IDENextHardware

Last updated 8 months ago