View Single Post
  #60   Spotlight this post!  
Unread 19-01-2011, 21:56
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: 756
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: How should we wire the photoswitchs?

Since I have now sucessfully got the Auto Mode line tracker working I thought I'd just clarify one thing...
We know there are two outputs fom the sensor Normally Open (Black) and Normally Closed (White).

I've found that the Sample Auto code that comes with the Robot template assumes a Normally Closed input, so if possible, wire the sensor's White wire to the White PWM wire (makes sense in hindsight).

If you connect the Black wire instead, then the logic in the sample program is inverted and there is no way for it to track. In my case, this is what I had, so I just inverted the logic inside the code and it works fine.

So:

Sensor Brown +12V
Sensor Blue 0V (GND)
Sensor White PWM White to DSC
Sensor Black No Connect.

Phil.

I also verified that the Flashing Orange LED means you have an output connected to a power source (in my case the PWM cable was offset by one pin and incorrectly connected to the +5V pin instead of the input pin). Smart little sensors those.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

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