Go to Post Mr.Lavery You Make My Day - Rohith Surampudi [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
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
  #3   Spotlight this post!  
Unread 20-12-2004, 07:21
Gamer930's Avatar
Gamer930 Gamer930 is offline
Team 930 and 171 Alumni
AKA: Justin
no team
Team Role: Alumni
 
Join Date: Mar 2002
Rookie Year: 2002
Location: New Berlin, WI
Posts: 388
Gamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to beholdGamer930 is a splendid one to behold
Re: White Paper Discuss: C Programming and Autonomous Modes for Newbies

I read this yesterday morning. I thought it was great also. I sent him a PM with my thanks.
I didn't notice this error yesterday but now reading it again I do see it. It seems like he messed up that whole section.

Here is what I think It should look like:
Code:
//place this line before while (autonomous_mode).
	unsigned char s_left = rc_dig_in01;
	unsigned char s_middle = rc_dig_in02;
	unsigned char s_right = rc_dig_in03;
//place this after Getdata(&rxdata);
if (s_left == 0 && s_middle == 1 && s_right == 0) 
// Middle sensor on
// Go straight
{
	pwm01=160; //left motor
pwm02=160; //right motor
}

else if (s_left == 1 && s_middle == 1 && s_right == 0) 
// Left 2 sensors on
// Turn soft Left
{
pwm01=127; //left motor
	pwm02=160; //right motor
}

else if (s_left == 1 && s_middle == 0 && s_right == 0) 
// Left sensor on
// Turn Hard Left
{
pwm01=127; //left motor
	pwm02=180; //right motor
}

else if (s_left == 0 && s_middle == 1 && s_right == 1) 
// Right 2 sensors on
// Turn soft right
{
pwm01=160; //left motor
pwm02=127; //right motor
}

else if (s_left == 0 && s_middle == 0 && s_right == 1) 
// Right Sensor on
// Turn Hard Right
{
pwm01=180; //left motor
	pwm02=127; //right motor
}

else 	 //stop
{
pwm01=127; //left motor
	pwm02=127; //right motor
}
The other error I saw was in Table 3 First Row, First Column (on the bottom of page 5), that should be Turn Left. The numbers and diagram is still correct

Again, Great Job Chuck
__________________
2010 to Present, Scorekeeper/Field Power Volunteer for FRC/FTC/FLL
2005 - 2010, Team 171 College Mentor
2002 - 2005, Team 930 Student

Last edited by Gamer930 : 20-12-2004 at 07:22. Reason: Tried to fix indenting on code
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autonomous Programming Guide cbolin Programming 2 16-12-2004 15:13
Autonomous Programming Competition Signup List SilverStar Programming 36 13-05-2004 15:09
Programming Autonomous mode Jared Stofflett Programming 3 11-11-2003 09:32
autonomous sensor programming ? Laura_d Programming 1 10-02-2003 17:46
How do you do the autonomous programming? Ryan Collings Programming 11 07-02-2003 19:38


All times are GMT -5. The time now is 00:19.

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