Go to Post Yeah.... I'll pay money just for a picture of Andy [Grady] getting jiggy! (then recommend it for the Caption contest!) ;) - Rich Wong [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 02-01-2014, 07:51 PM
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Iterative Robot - Need Help!!!

Quote:
Originally Posted by James Lightfoot View Post
1) Where can I find who to use the "iterative Robot" class's methods?
robotInit() is called when the robot first boots. <mode>Init() is called at the beginning of the given mode, and <mode>Periodic() is called every time a data packet is received from the driver station (in practice, this is every 20ms, or 50 times per second). <mode> is one of teleop, autonomous, test, or disabled.

Quote:
Originally Posted by James Lightfoot View Post
2) Where can I see or program to map the physical I/O to things like Jaguars & ultrasonic sensors?
Here, under "Actuators" and "Sensors".

Quote:
Originally Posted by James Lightfoot View Post
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?
While it is theoretically possible, I am not sure whether that would be legal. Sending the PWM signal from software is not difficult:
Code:
motor.set(Relay.Value.kForward) // relay
motor.set(1); // PWM
Quote:
Originally Posted by James Lightfoot View Post
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?
I don't know of any way to read a PWM signal from the cRIO. I would go with the analog signal if possible, as it's pretty simple to program:
Code:
AnalogChannel input = new AnalogChannel(<port>); // change <port> for your setup
input.getAverageVoltage(); // returns analog signal
__________________
I code stuff.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:34 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi