|
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
|