Go to Post These are threads, and they are what hold the community together...so CD must be a threaded fastener right? - Andrew Blair [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #13   Spotlight this post!  
Unread 20-01-2008, 22:35
blaxbb blaxbb is offline
Ohio State Engineering Scholar
AKA: Brian Barrett
FRC #2331
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Vernon, New Jersey
Posts: 131
blaxbb is just really niceblaxbb is just really niceblaxbb is just really niceblaxbb is just really niceblaxbb is just really nice
Re: A New Programmer

under ///*** DEFINE USER VARIABLES AND INITIALIZE THEM HERE ***/ or at the top of any .c file

to make it easier you should define your speeds so that you can update all of your speed values without changing every single one.

you can define your speeds once and call them multiple times
Code:
#define stop 127
#define forward 200
#define reverse 50
then instead of saying
Code:
pwm01 = 200;
pwm02 = 50;
you can say
Code:
pwm01 = forward;
pwm02 = reverse;
this makes it so much easier if you need to change a value quickly (at a competition)
__________________
"Whether you think you can or think you can’t, you’re right." - Henry Ford
www.vthsrobotics.org
 


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
NEW PROGRAMMER!!!!! NEED HELP!!!! delphi demon Programming 5 19-04-2007 13:22
pic: Team 1249's new programmer roborat Extra Discussion 4 23-06-2006 22:02
Senior Programmer: advice on training new recruits Jeff_Rice Programming 9 04-01-2005 16:59
Help for New Programmer Mike375 Programming 3 27-09-2001 09:04


All times are GMT -5. The time now is 20:27.

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