Go to Post Since our team is in possession of the school, we have no restrictions on how late we can be there. So our teams are often practicing into the wee hours of the morning. Also, the school board uses "the breeze" for storage of high jump mats, so it's a great place to nap. :) - Karthik [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2011, 20:17
Robby Unruh's Avatar
Robby Unruh Robby Unruh is offline
*insert random dial-up tone here*
FRC #3266 (Robots R Us)
Team Role: Coach
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Eaton, OH
Posts: 338
Robby Unruh will become famous soon enough
Re: Autonomous Photosensor Programming

How are you guys programming your Y's? I'm having some trouble with mine. Any tips would be really appreciated.
__________________
[Robots R Us #3266]
2015: Georgia Southern Classic (Winners / Thanks 1319 & 1648!), Queen City
2014: Crossroads, Queen City
2013: Buckeye, Queen City, Crossroads
2012: Buckeye, Queen City

2011: Buckeye
2010: Buckeye
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2011, 21:21
Patrickwhite's Avatar
Patrickwhite Patrickwhite is offline
May the North be with you
FRC #0610 (The Coyotes)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Toronto
Posts: 88
Patrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of light
Re: Autonomous Photosensor Programming

Quote:
Originally Posted by Robby Unruh View Post
How are you guys programming your Y's? I'm having some trouble with mine. Any tips would be really appreciated.
Our robot drives straight on the line, so it notices when the middle sensor is no longer over the tape, but the left and right both are. At that point, we begin turning in the direction we want to go. Using the code you've already posted as a template:
Code:
if(left.get() && !middle.get() && right.get()) {
        // turn left or right, depending on what you want
    }
It wouldn't go on as another else, it would be a separate if, or it would never be triggered.
__________________
while(!going.isTough());
tough.exit();

What will we do tonight, Warfa?
The same thing we do every night, Patrick. Sit and wait for Electrical.

Last edited by Patrickwhite : 20-02-2011 at 21:29. Reason: forgot to write the point of the post
Reply With Quote
Reply


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 11:30.

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