View Single Post
  #8   Spotlight this post!  
Unread 26-02-2007, 18:09
meatmanek meatmanek is offline
Programmer/physicist/mathematician
FRC #0868 (TechHounds)
Team Role: Programmer
 
Join Date: Mar 2004
Rookie Year: 2004
Location: Carmel, Indiana
Posts: 142
meatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to beholdmeatmanek is a splendid one to behold
Re: Lowering the voltage on a spike

For your own sanity, please don't just say 'pwm01 = 155; // slow forward.'
do this instead:

Code:
#define DRIVE_SLOW_FWD 155
#define DRIVE_SLOW_REV 99

// other code...

pwm01 = DRIVE_SLOW_FWD;
For one, it saves you a comment every time you use that value
for two, if you ever want to change the value, you don't have to find'n'replace 155

But, to allow you to save face, I'm going to assume that you replaced your #define or equivalent with 155 when you pasted for clarity.
This comment was directed toward new programmers.
__________________
Real programmers use vim.