Go to Post A good robot with great strategy beats a great robot with good strategy. - Brian Maher [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-12-2004, 22:33
cbolin's Avatar
cbolin cbolin is offline
Programming & Electrical
FRC #0342 (Burning Magnetos)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Charleston, SC
Posts: 72
cbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to behold
White Paper Discuss: C Programming and Autonomous Modes for Newbies

Thread created automatically to discuss a document in the White Papers.

C Programming and Autonomous Modes for Newbies by cbolin
__________________
Team 342 Programming & Control Systems
Good luck and have fun!
Reply With Quote
  #2   Spotlight this post!  
Unread 19-12-2004, 22:35
Billfred's Avatar
Billfred Billfred is offline
...and you can't! teach! that!
FRC #5402 (Iron Kings); no team (AndyMark)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: The Land of the Kokomese, IN
Posts: 8,547
Billfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond reputeBillfred has a reputation beyond repute
Re: White Paper Discuss: C Programming and Autonomous Modes for Newbies

Congratulations, Chuck--I guess it takes a South Carolinian to speak to a South Carolinian. This is the first programming white paper that actually clicked with me. (I'm not a programmer by any stretch. But I guess that's obvious).

One question, on the line tracking example in the autonomous notes...at Position D, when the left sensor is made, shouldn't the robot turn to the left instead of the right?

But other than that, bravo!
__________________
William "Billfred" Leverette - Gamecock/Jessica Boucher victim/Marketing & Sales Specialist at AndyMark

2004-2006: FRC 1293 (D5 Robotics) - Student, Mentor, Coach
2007-2009: FRC 1618 (Capital Robotics) - Mentor, Coach
2009-2013: FRC 2815 (Los Pollos Locos) - Mentor, Coach - Palmetto '09, Peachtree '11, Palmetto '11, Palmetto '12
2010: FRC 1398 (Keenan Robo-Raiders) - Mentor - Palmetto '10
2014-2016: FRC 4901 (Garnet Squadron) - Co-Founder and Head Bot Coach - Orlando '14, SCRIW '16
2017-: FRC 5402 (Iron Kings) - Mentor

94 events (more than will fit in a ChiefDelphi signature), 14 seasons, over 61,000 miles, and still on a mission from Bob.

Rule #1: Do not die. Rule #2: Be respectful. Rule #3: Be safe. Rule #4: Follow the handbook.
Reply With Quote
  #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
  #4   Spotlight this post!  
Unread 09-01-2008, 19:32
Computermaster's Avatar
Computermaster Computermaster is offline
TechHOUNDS Programmer
FRC #0868 (TechHOUNDS)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Carmel
Posts: 6
Computermaster is an unknown quantity at this point
Re: White Paper Discuss: C Programming and Autonomous Modes for Newbies

I am a newbie; this is my first year in FRC. I know how to program in many other languages, but C is a new one for me. If anyone has any tips or advice on programming for a newbie, I'd be much obliged. All I have to learn it at home is a college textbook...I'm a freshmen in High School! Anyway, any help would be greatly appreciated. Thanks!
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

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 05:48.

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