Never underestimate the ability of a team of high school students and engineers to break expensive things. - Alan Anderson [more]
 Chief Delphi autonomous sensor programming ?
 Team 51 CD-Events CD-Media CD-Swap CD-Spy FRC-Spy Unsung FIRST Heroes WFA
The Chief Delphi Forums are sponsored by Innovation First International, Inc.

#1
02-10-2003, 04:28 PM
 Laura_d Registered User #0755 (Metallic Tigers) Join Date: Feb 2003 Location: Washington, KS Posts: 1
autonomous sensor programming ?

We're trying to use three sensors to track the white line in the autonomous mode. We're using 1 joystick drive. Our left sensor is on rc_sw1, pin 1, our middle sensor is pm rc_sw2, pin 2, and the right one is on rc_sw3, pin 15. I have tried lots of different things, but since I don't really understand what I'm doing I haven't accomplished anything remotely useful, and I have managed to completely confuse myself. If anyone has any suggestions as to how to get these sensors to recognize the tape and turn and basically just WORK, I would be thrilled.
#2
02-10-2003, 04:46 PM
 Skabana159 Robotics and Field Hockey AKA: Jesse C. Owens #0159 (Alpine Robotics) Team Role: Mentor Join Date: Mar 2002 Rookie Year: 2000 Location: Ft. Collins, CO Posts: 92
What you should do in instances like this is write psuedo-code in english. You should try this:

If the middle sensor is on, then I want to go straight.
If only the left sensor is on, then I want to turn left.
If only the right sensor is on, then I want to turn right.
If no sensors are on, then spin in a circle.

Now, go on to write your code:

If (rc_sw2) then gostraight
If (rc_sw1)&(rc_sw3 = 0) then turnleft
If (rc_sw3)&(rc_sw1 = 0) then turnright
goto turnleft

gostraight:
p1_x = 127
p1_y = 200 'random forward speed, should be tested on bot
goto restofcode

turnleft:
p1_x = 84
p1_y = 127
goto restofcode

turnright:
p1_x = 200
p1_y = 127

restofcode:
...
...
...
serout ...
__________________
"What most people do not understand is that the Buddha, the Godhead, resides just as comfortably in gears and circuits as in hills and trees. To believe otherwise is to dilute the Godhead."
-Robert Pirsig, Zen and the Art of Motorcycle Maintenance

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum         FIRST E-Mail Blast Archive     Rumor Mill     Career     Robot Showcase     Moderated Discussion Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         WindRiver C++         Java         MATLAB & Simulink         Python     intelitek easyC/REC information         easyC v2 for Vex         easyC for FRC         REC/Learnmate         WPILib         easyC PRO     Control System         IFI Control System         FRC Control System         Sensors         USB Chicklet     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Pro ENGINEER / Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics     National Instruments LabVIEW and Data Acquisition         LabView and Data Acquisition Competition     Awards         Chairman's Award     Rules/Strategy         Scouting         You Make The Call     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     FIRST in Michigan     Mid-Atlantic Robotics     Off-Season Events         Chief Delphi Invitational     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A         OCCRA Programming Other     Unsung FIRST Heroes     Chit-Chat         Games/Trivia             Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         Western Region Robotics Forum         Robot Chicks Union (RCU)         Southern California Regional Robotics Forum         Hearing-Impared Network         FIRST Interactive Rural SupporT         freelanceFIRST         FIRST Scouting Network         openFIRST         The Grand FIRST Team         FloridaFIRST         Inspiration Foundation Inc.         South Dakota FIRST         FIRST International Partners         FIRSTwiki         Ultimate Robot Challenge         East Coast Drivers Union         Team San Diego         CollegiateFIRST         Dream FIRST         FIRST Brasil         The Blue Alliance             Video Archives     FIRST Historians     FIRST-A-Holic's Anonymous Mailbox     FIRST In the News...     FIRST Lego League         Lego Mindstorm Discussion     FIRST Tech Challenge         FTC E-Mail Blast Archive     VEX         VEX Robotics Competition     Televised Robotics     Math and Science         NASA Discussion ChiefDelphi.com Website     CD Forum Support         Bulletins and Newsletters     Extra Discussion Old Forum Archives     1999     2000     2001

 Similar Threads Thread Thread Starter Forum Replies Last Post A better autonomous method.. randomperson Programming 4 02-24-2004 05:02 PM Electrical componenets for autonomous navigation maclaren Electrical 10 12-18-2003 01:28 AM crazy idea for autonomous Mike Ciance Programming 16 04-24-2003 08:50 PM autonomous mode problem on field Chris_C Programming 17 03-26-2003 06:11 PM Autonomous Kill Switch UCGL_Guy Programming 8 01-15-2003 04:39 PM

All times are GMT -5. The time now is 11:08 PM.

The Chief Delphi Forums are sponsored by Innovation First, Inc.

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Team Site - Archive - Top