This project demonstrates the use of a Teensy 3.5 to prototype an FRC robot subsystem, developed in Java. It provides slew and center capabilities to an Adafruit Mini Pan-Tilt. The developed code implements WPILib commands and a subsystem. A subset of the WPILib command scheduler has been ported and is run at startup. The commands and subsystem can be directly deployed on a roboRio (if an IServo is implemented against the WPILib) if desired.
This gives the flexibility to run the subsystem as a standalone unit (plugging the teensy into the roboRio), or to plug the servos directly into the roboRio. To call the subsystem as a standalone unit, you would send serial commands using the WPILib SerialPort class. See the CameraMountJoystickDriver project for a standalone Windows Java application that implements the serial interface.
- Arduino IDE (which you do not need to use as an IDE)
- Teensyduino
- Realterm (optional if you want to send commands manually to the teensy)
And of course VSCode for FRC development (which includes the JDK and gradle).
- Plug in the pan servo (yellow wire) to pin 36 and tilt servo to pin 35 on the teensy and make sure the servos have power. You can plug them in to the 3v3 power on the teensy.
gradlew deploy
- The Teensy Loader should appear.
- Push the button on the teensy and observe the generated hex file being uploaded to the teensy.
- Use Realterm to connect to the teensy COM port (COM4 on my Windows 10 system). (56700, 8, 1, N which is the Realterm default)
- See the serial commands documented in the CommandProcessor.process() method.
or...
- Use a joystick and the above referenced driver project.
- Remove the Arduino and Teensyduino pre-install requirements
Move boilerplate gradle tasks out of build.gradle and into a reusable file(maybe vscode plugin?)- Cut release tag of dependencies so release tags can be used instead of commit tags