Thread: Robot Drifting
View Single Post
  #11   Spotlight this post!  
Unread 13-02-2004, 22:52
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Robot Drifting

Quote:
Originally Posted by AsimC
When you say current power...where am i getting this number from?
That's your normal pwm output value.

This is a more concrete example using a joystick value to drive:
Code:
int temp; // use to hold signed pwm value (-127 to 127) for simpler math
 
pwm13 = p1_y; // (or whatever your normal power calculation is)
temp = pwm13 - 127;  // convert to human math:) 
temp = temp - (temp/127 * 10);
pwm13 = temp + 127; // convert back to normal 0-254 range
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle