View Single Post
  #13   Spotlight this post!  
Unread 03-08-2006, 08:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,833
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: Globe Motor Programming Questions

You're correct that if pwm01 gets set to a number greater than 255 it will wrap around to zero and you'll suddenly go from full forward to full reverse.

A note on using a pwm value of 255.

The reason to avoid using the value 255 is that sequential 255's in a transmission packet is the standard indication of the beginning of a packet, so if pwm03 and pwm04 (which are side-by-side in the transmission packet) were both transmitted as 255 the packet handler would think pwm05 was really the start of a transmission packet and the OI would be handed really bogus data.

Those of you allowing 255 are protected from the adverse effects, because the Master code takes all your carefully set values of 255 and changes them to 254 anyway. You can test this by setting the pwm values to 255 in your code, then using the Dashboard to see what values actually arrives at the OI.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle