package org.usfirst.frc.team4930.robot; import edu.wpi.first.wpilibj.SampleRobot; import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj.CameraServer; import edu.wpi.cscore.UsbCamera; public class Robot extends SampleRobot { CameraServer server; UsbCamera cam1; SendableChooser chooser; public Robot() { server = CameraServer.getInstance(); } public void robotInit() { chooser = new SendableChooser(); // not sure about these next few lines, will need to play with this a bit // aslo, smartdashboard will need a camera element added to its display cam1 = server.startAutomaticCapture(); // addtional cameras will nbe needed at some point... // server.addCamera(cam1); // server.startAutomaticCapture(cam1); cam1.setResolution(320, 240); } public void autonomous() { //nothing } public void operatorControl() { double randomInfo = 1.0; while (isOperatorControl() && isEnabled()) { // need to put something on dashbaord to have something show up under Java dashbaord SmartDashboard.putNumber("here is a number...", randomInfo); // wait for a motor update time Timer.delay(0.005); } } public void test() { //nothing } }