View Single Post
  #2   Spotlight this post!  
Unread 19-01-2011, 11:33
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Error in Robot Framework with Game Code

Hi

Yeah..... a bit of a gotcha. BTW, if you are just using the light sensors in Auto, it's actually a lot easier just to open them right there before the loop and save the effort of storing and retreiving the refnums.

Without verifying it..... I also think that the code assumes that the Normally Closed outpts from the sensors are used. When I ran the program for the first time with the Normally Open outputs wired, the LED on the "Line" was off, and the other two were on.

Just mentioning it so that anyone using this code checks that the LEDs on the AutoIndependant Front Panel are correct. The LED should ligt up when the sensor is OVER the line. I think we may need to throw in an inversion.

I also think for testing it will be easier to move this code to the TELEOP VI and engage it when you press a Joystick button. eg: Left button to stay on the left side of the line, right button to stay on the right side.

This way it's easier to just let go the button to turn off tracking, and drive back into position

Follow Up:

Yes, as suspected the Auto Code assumes N/C outputs on the Line sensors.

So, if you wire the Black output wire to the Digital Sidecar, you will have to invert the sensor inputs before they are combined into a index value for the case structure.
If you haven't wired them yet... make sure you use the following wiring:

Sensor Brown +12V
Sensor Blue 0V GND
Sensor White Digital Sidecar Digital In (White PWM wire)




Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor

Last edited by PhilBot : 19-01-2011 at 21:48. Reason: More information.
Reply With Quote