View Single Post
  #5   Spotlight this post!  
Unread 14-02-2010, 10:36
mark.amber mark.amber is offline
Registered User
FRC #2039
 
Join Date: Jan 2010
Location: Rockford IL
Posts: 12
mark.amber is an unknown quantity at this point
Re: We have some things working with java, if you need help look here

sorry for forgetting about this thread.

to get camera feed put this in the import section

import edu.wpi.first.wpilibj.camera.AxisCamera;

and this in robot init

AxisCamera.getInstance().writeResolution(AxisCamer a.ResolutionT.k320x240);AxisCamera.getInstance().w riteBrightness(0);

that will start getting the image from the camera, make sure that you have the camera configured properly by using the circle tracker demo



for the servo, you just use:

Servo servo = new Servo(slot, 10);

then to tell the servo where to go you use

servo.set(-1 to 1)

you could also say

servo.set((Joystick(1).getX())) now the servo will go up and down with the jostick
Reply With Quote