Go to Post Are you asking if I can pick up electrons? I'm positive. - Gary Dillard [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 24-01-2011, 01:16
jase728 jase728 is offline
Registered User
AKA: Jase728
FRC #3210 (Falcons)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Hillsboro
Posts: 11
jase728 is an unknown quantity at this point
Re: 2011 "Light Sensor"

the way I am doing it is a variance of the software they give us

basically using the basic digital input keep going straight until the input returns a false then using a gyri scope and getting a value from it you can auto correct
__________________
"In theory there is reality, but in reality there is no theory" - Erich Keane (FRC 2010 Build Season - Team 3210)
  #17   Spotlight this post!  
Unread 24-01-2011, 05:58
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: 2011 "Light Sensor"

I am planning on using the light sensors as confirmation sensors possibly if I want the robot to go diagonal in autonomous. I do not know however, if the light sensor detects the red/blue & yellow pro gaff tape.

The sensors would confirm what "path" you are on alongside with an angle measurement and data from accelerometer/encoder, then use trigonometry to calculate the distance that the robot needs to be from the peg. Possibly use the camera then to once again confirm the distance and possibly the height of the arm.

This is more for fun though, at the least we are going to have a mode that goes straight, using accelerometer data and camera to confirm distance from scoring peg. I guess the line can be used to stay on path if robot isn't straight but I have confidence in my team to align the robot.

Last edited by MagiChau : 24-01-2011 at 06:04.
  #18   Spotlight this post!  
Unread 03-02-2011, 15:42
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Re: 2011 "Light Sensor"

This really helps, being boolean, but which wiring diagram do I use?

"Dual NPN and PNP outputs" or "NPN Outputs"?

Yes, this is straight from the included instructions.
  #19   Spotlight this post!  
Unread 03-02-2011, 15:50
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: 2011 "Light Sensor"

Quote:
Originally Posted by kws4000 View Post
This really helps, being boolean, but which wiring diagram do I use?

"Dual NPN and PNP outputs" or "NPN Outputs"?

Yes, this is straight from the included instructions.
Sorta neither.

The diagrams provided include "load", a resistor to pull-up the signal lines so they are high when not connected. The Digital Sidecar already provides those, so you just need to connect the brown to +12(red) on the PD board, blue to the gnd(black) on the PD board, and white or black to a SIG pin on one of the DIO ports on the digital sidecar. You don't need white and black, pick one. White will tell you when you see light, black will tell you when you see dark, so if you have one, you know the other.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #20   Spotlight this post!  
Unread 03-02-2011, 15:55
kws4000's Avatar
kws4000 kws4000 is offline
Team Mentor - Programming
AKA: Krazy Karl
FRC #2405 (Divided by Zero)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Fruitport, MI
Posts: 164
kws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the roughkws4000 is a jewel in the rough
Smile Re: 2011 "Light Sensor"

HALELUJAH!
  #21   Spotlight this post!  
Unread 04-02-2011, 00:08
PSHRobotics PSHRobotics is offline
Registered User
FRC #1182
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Missouri
Posts: 38
PSHRobotics is an unknown quantity at this point
Re: 2011 "Light Sensor"

Since there seems to be some confusion about this, the Autonomous Independent vi from the "Robot Code with Game Framework" in LabView for 2011 actually does the line tracking using the Light Sensors. My team has created our own code using two sensors instead of three (like the code we are provided with) in case we want to use the third sensor for something else and because we see no use for the 3rd sensor and have had some trouble making sense of the code that was provided for us (because of the multiple values in the Steering Gain and Y Power controls). We finally got our code correctly functioning today. The most difficult part was stopping at the T because our sensors are not lined up perfectly (attached using duct tape at the moment), so we had to adapt the code to stop if the sensors became true within half a second of each other.

If anyone has any questions about programming for the sensors I'll help as much as possible.
  #22   Spotlight this post!  
Unread 04-02-2011, 19:46
jase728 jase728 is offline
Registered User
AKA: Jase728
FRC #3210 (Falcons)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Hillsboro
Posts: 11
jase728 is an unknown quantity at this point
Re: 2011 "Light Sensor"

I decided to code our line tracking using a state machine. Just use a bunch of switch statements.
__________________
"In theory there is reality, but in reality there is no theory" - Erich Keane (FRC 2010 Build Season - Team 3210)
  #23   Spotlight this post!  
Unread 05-02-2011, 14:23
Shruikan27's Avatar
Shruikan27 Shruikan27 is offline
Roxanne Jassawalla
AKA: Roxanne
FRC #2068 (Metal Jackets)
Team Role: Student
 
Join Date: Feb 2011
Rookie Year: 2011
Location: United States
Posts: 2
Shruikan27 is an unknown quantity at this point
Re: 2011 "Light Sensor"

Quote:
Originally Posted by apalrd View Post
Sorta neither.

The diagrams provided include "load", a resistor to pull-up the signal lines so they are high when not connected. The Digital Sidecar already provides those, so you just need to connect the brown to +12(red) on the PD board, blue to the gnd(black) on the PD board, and white or black to a SIG pin on one of the DIO ports on the digital sidecar. You don't need white and black, pick one. White will tell you when you see light, black will tell you when you see dark, so if you have one, you know the other.
Hello, this is my first year in FRC, and my mentor set me on the task of an issue we were having with the light sensor. I'm sorry if I sound like a complete newb but where exactly does the blue/black and the brown/red attach to on the PD Board? This forum has been very helpful to me and I thank you all for your input.
Closed Thread


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 03:54.

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