Recent Updates
-
Updated on: Aug 21, 2013
Potentiometers to measure joint angle or linear motion
Potentiometers are a common analog sensor used to measure absolute angular rotation or linear motion (string pots) of a mechanism. A potentiometer is a three terminal device that uses a moving contact to from a variable resistor divider. When the outer contacts are connected to 5V and ground and the variable contact is connected to an analog input, the analog input will see an analog voltage that varies as the potentiometer is turned.
Manual WPILib programming -
Updated on: Aug 21, 2013
Analog triggers
An analog trigger is a way to convert an analog signal into a digital signal using resources built into the FPGA. The resulting digital signal can then be used directly or fed into other digital components of the FPGA such as the counter or encoder modules. The analog trigger module works by comparing analog signals to a voltage range set by the code. The specific return types and meanings depend on the analog trigger mode in use.
Manual WPILib programming -
Updated on: Aug 19, 2013
Displaying Data on the DS - Dashboard Overview
Often it is desirable to get feedback from the robot back to the drivers. The communications protocol between the robot and the driver station includes provisions for sending program specific data. The program at the driver station that receives the data is called the dashboard.
Manual WPILib programming -
Updated on: Aug 19, 2013
Custom IO - Cypress FirstTouch Module
The Cypress FirstTouch IO module is a board that allows teams to interface to custom IO solutions such as potentiometers, buttons, switches, encoders, and much more. The methods used with the Cypress board in standard (compatible) mode may also be used to interface with virtual IO provided by the DS software if the Cypress board is not attached.
Manual WPILib programming -
Updated on: Aug 14, 2013
Driver Station Input Overview
The FRC Driver Station software serves as the interface between the human operators and the robot. The software takes input from a number of sources and forwards it to the robot where the robot code can act on it to control mechanisms.
Manual WPILib programming -
Updated on: Aug 09, 2013
Operating pneumatic cylinders - Solenoids
There are two ways to connect and operate pneumatic solenoid valves to trigger pneumatic cylinder movement using the current control system. One option is to hook the solenoids up to a Spike relay; to learn how to utilize solenoids connected in this manner in code see the article on Relays. The second option is to connect the solenoids to a solenoid breakout board on top of a NI 9472 Digital Sourcing module in the cRIO (slot 3). To use these solenoids in code, use the WPILib "Solenoid" and/or "Double Solenoid" classes, detailed below.
Manual WPILib programming -
Updated on: Aug 08, 2013
On/Off control of motors and other mechanisms - Relays
For On/Off control of motors or other mechanisms such as solenoids, lights or other custom circuits, WPILib has built in support for relay outputs designed to interface to the Spike H-Bridge Relay from VEX Robotics. These devices utilize a 3-pin output (GND, forward, reverse) to independently control the state of two relays connected in an H-Bridge configuration. This allows the relay to provide power to the outputs in either polarity or turn both outputs on at the same time.
Manual WPILib programming -
Updated on: Aug 07, 2013
Using the motor safety feature
Motor Safety is a mechanism in WPILib that takes the concept of a watchdog and breaks it out into one watchdog (Motro Safety timer) for each individual actuator. Note that this protection mechanism is in addition to the System Watchdog which is controlled by the Network Communications code and the FPGA and will disable all actuator outputs if it does not receive a valid data packet for 125ms.
Manual WPILib programming -
Updated on: Aug 07, 2013
Repeatable Low Power Movement - Controlling Servos with WPILib
Servo motors are a type of motor which integrates positional feedback into the motor in order to allow a single motor to perform repeatable, controllable movement, taking position as the input signal. WPILib provides the capability to control servos which match the common hobby input specification (PWM signal, 1.0ms-2.0ms pulse width)
Manual WPILib programming -
Updated on: Aug 07, 2013
Actuator Overview
This section discusses the control of motors and pneumatics through speed controllers, relays, and WPILib methods.
Manual WPILib programming
