Motor Mount and Wheel Kit w/ Position Controller code question
Joe Fishback
Posts: 99
I have two questions about the code syntax in the Parallax documention of the "Position Controller" . Under the "Commman Set Details" for the
Command #4 TRVL it is written
Transmit Data Format
[noparse][[/noparse]·Command:Address] , [noparse][[/noparse]NumberH] , [noparse][[/noparse]NumberL]
In the code that command is written as follows-
GoDistance:
· SEROUT CommPin, BaudValve, [noparse][[/noparse]TRVL + Wheel]
· SEROUT CommPin, BaudValve, [noparse][[/noparse]Distance.HIGHBYTE, Distance.LOWBYTE]
Does Command:Address mean you add the Command and Address?
Why is the SEROUT command put on two lines and not one line as it is in the documention? What is the rule for putting a SEROUT command on·two lines ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-
Command #4 TRVL it is written
Transmit Data Format
[noparse][[/noparse]·Command:Address] , [noparse][[/noparse]NumberH] , [noparse][[/noparse]NumberL]
In the code that command is written as follows-
GoDistance:
· SEROUT CommPin, BaudValve, [noparse][[/noparse]TRVL + Wheel]
· SEROUT CommPin, BaudValve, [noparse][[/noparse]Distance.HIGHBYTE, Distance.LOWBYTE]
Does Command:Address mean you add the Command and Address?
Why is the SEROUT command put on two lines and not one line as it is in the documention? What is the rule for putting a SEROUT command on·two lines ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-
Comments
The demo code is written as you have written it in GoDistance.
I have tried the demo code with the Position Controller and it works. Therefore the GoDistance code syntax is correct as written.
Regards,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!