Go to Post i swear, if it were april fools day, i would not believe this whole lord dumpling/dean kamen thing...but then again, this is FIRST - sure_smile [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
  #2   Spotlight this post!  
Unread 18-02-2011, 18:09
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

In NetBeans, if you create a new FRC Project, and choose from the FRC Sample Projects, you can see one that is a line following project. If you create that project, you can see the example code. It's a bit hard to follow, but it works on the a few basic premises:
1) Using the driver station's digital inputs to choose whether to follow the straight or narrow, and whether to go left or right at the fork
2) Changing the motor's speed based on the time that has elapsed
3) Getting the values from the light sensors and storing it in an integer as a single binary string, i.e. 111 (7) is all sensors on, 000 (0) is all sensors off, 010 (2) is the middle sensor on, etc.
4) Running a switch statement based on the binary string to determine how much to turn.

Take a look through it, and if you have any questions, feel free to come back and ask.
__________________
while(!going.isTough());
tough.exit();

What will we do tonight, Warfa?
The same thing we do every night, Patrick. Sit and wait for Electrical.
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 13:24.

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