![]() |
Iterative Robot - Need Help!!!
Hi,
This code is iterative robot template based. If you can spot something that is wrong in the code below, please let me know so I can fix the error. Suggestions would also be nice. Will this code work for the following functions: 1. Mobility 2. Moving wheels through motors 3. Pneumatics -> Piston Also, for function #3, I know I have two instances of the code. One is the relay version and the other is the solenoid version. Which one do I use? Also, I'd appreciate it if anyone can look over the parameters to see if they are correct in the constructors. Here is the code: Code:
package edu.wpi.first.wpilibj.templates; |
Re: Iterative Robot - Need Help!!!
Quote:
You could also use the DoubleSolenoid class, instead of two Solenoid objects. I don't see anything obviously wrong with the code. |
Re: Iterative Robot - Need Help!!!
Quote:
|
Re: Iterative Robot - Need Help!!!
Code:
package edu.wpi.first.wpilibj.templates;final int victorOneChannel = 3; Code:
Code:
public void autonomousPeriodic() {Code:
//one variation to work with pistonCode:
//which one to choose?Code:
|
Re: Iterative Robot - Need Help!!!
Hello all,
I am a rookie mentor w/ only one experienced programmer. He is learning Java. I am an EE for process controls & automation, but my programming is platform specific. I can read the existing Java code from last year's robot, but we are adding & changing things. I have a few quick questions 1) Where can I find who to use the "iterative Robot" class's methods? 2) Where can I see or program to map the physical I/O to things like Jaguars & ultrasonic sensors? 3) Can I use a relay output point to turn on a motor (w/ the 3 wire pig tail and the 2 power wires) or should I wire them to a PWM point and simply send it a full speed signal? 4) Is there an input that will work with the PWM output of an ultrasonic sensor (300 micro-seconds to 9999 micro-seconds) or do I have to use the voltage analog output from the sensor? ::ouch:: |
Re: Iterative Robot - Need Help!!!
Quote:
Quote:
Quote:
Code:
motor.set(Relay.Value.kForward) // relayQuote:
Code:
AnalogChannel input = new AnalogChannel(<port>); // change <port> for your setup |
| All times are GMT -5. The time now is 11:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi