View Full Version : Crio does not accept new programs
Robototes2412
01-02-2010, 22:09
Instead, it just spins the motor on port 1 at ~5% speed, weve even tried reformatting.
Help pls.
The code is just a dead simple make this motor go project
Mark McLeod
01-02-2010, 22:38
What language?
What are the steps you follow to download?
Can you create a brand-new default program and download that?
What do the many status lights on the Driver Station show?
What do the many status lights on the Digital sidecar show?
Possibly a description of how you wired your robot might help.
Alan Anderson
01-02-2010, 22:49
Can you double-check your wiring? Odd behavior on the PWM outputs is often explained by not having the Digital Sidecar powered properly from a 20 amp breaker.
Robototes2412
02-02-2010, 18:39
We did make sure everything was wired goodwise. We are using java. heres the code:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.*;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the SimpleRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class EEARGH extends SimpleRobot
{
Joystick xbox = new Joystick(1);
Jaguar motor = new Jaguar(1);
Jaguar otherMotor = new Jaguar(2);
/**
* This function is called once each time the robot enters autonomous mode.
*/
public void autonomous() {
while(isEnabled()) {
motor.set(1);
Timer.delay(5);
motor.set(0);
Timer.delay(5);
}
}
/**
* This function is called once each time the robot enters operator control.
*/
public void operatorControl()
{
getWatchdog().setEnabled(true);
getWatchdog().feed();
//boolean isReversed = false;
double speed = xbox.getRawAxis(2);
//motor.set(0);
while(isOperatorControl())
{
otherMotor.set(-speed);
getWatchdog().feed();
}
}
}
sometimes the motor just spins creepily by itself, without user input.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.