![]() |
We have some things working with java, if you need help look here
Quote:
Classmate PC running:
The cRIO:
Code contains working sections for:
Procedures we know
Quote:
|
Re: We have some things working with java, if you need help look here
We are looking for some sample code that displays images from the camera on the driver station display. The sample code talks about instantiating the class and then setting brightness level and resolution.
What do we do after the camera instance is created in code to display the picture? - Sunit |
Re: We have some things working with java, if you need help look here
If you create a sample Java project - the CircleTrackerDemo it will track the target and display the output on the dashboard. You should be able to use that as a model to write your own programs to track the target and display images. When the camera is running it will automatically tries to connect to the dashboard program and send images.
Brad |
Re: We have some things working with java, if you need help look here
Mind posting your code on the section about the servos? We couldn't ever get it to work beyond one single movement. (Ex:We can set the sensitivity to whatever we want, but it will only move once in any direction.)
|
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 |
Re: We have some things working with java, if you need help look here
do you have a copy of this default code from last year that you might share, or do you know where i might get a copy from last year?
thanks Quote:
|
Re: We have some things working with java, if you need help look here
Hello Java gurus.
Sorry if this is slightly off-topic, but I've got a Java question I've been unable to find an answer for. Can anyone tell me: If you start several threads at the same priority, what scheduling policy is used to run them concurrently? Someone said it was not time-based, but rather based on number of bytecodes executed. Is this correct, and can anyone link to a document where this is discussed? I'm referring to the 2011 FRC Java Framework implementation here specifically. Thank you. |
Re: We have some things working with java, if you need help look here
My team is trying to switch over to Java from C++ and we're having difficulties getting netbeans to find the wpilibj class files. I followed the "Getting Started with Java for FRC" pdf. Everything goes off without a hitch except until I try to instantiate any of the wpilibj classes, in which case it tells me it "cannot find symbol".
|
Re: We have some things working with java, if you need help look here
Quote:
Let me know if you have any more questions. I can give you a step by step if you would like. |
Re: We have some things working with java, if you need help look here
I already installed the plugins. I've actually done it multiple times. Twice using by linking netbeans to the update site, and once by downloading them manually. In each case all works fine. I can see the little frc logo on the menu and all that. I can open the javadocs and open the templates and everything. But every time I try to test out a SimpleRobot template, I try to instantiate something simple like a gyro or accelerometer and it can't seem to find it. Im running windows 7. Under the FRC Configuration tab in the options menu its using the standard WPILibJ location. The file path is C:/Users/Ivan/sunspotfrcsdk/lib/WPILibJ. Any clue what I'm doing wrong here?
|
Re: We have some things working with java, if you need help look here
Quote:
Code:
import edu.wpi.first.wpilibj.Gyro; |
Re: We have some things working with java, if you need help look here
Quote:
|
Re: We have some things working with java, if you need help look here
As embarrassed as I am to say it, you guys are right, it was the imports. Its working fine now. Big thanks :D.
|
Re: We have some things working with java, if you need help look here
no problem, I'm glad to help
|
| All times are GMT -5. The time now is 10:33. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi