by siempre.aprendiendo » Tue Feb 25, 2014 8:31 pm
by siempre.aprendiendo
Tue Feb 25, 2014 8:31 pm
Having the motion files is really easy. Basically, you only need a endless loop to read data from the remote control and execute the motions (or others orders) you want depending on the pushed button. I have attached parts of the code (in spanish) from an example I created:
1. Inside the endless loop:
teclaMando means remoteCommandKey (pushed)
ejecutarComando means executeCommand
Before the endless loop it does some initialization.

2.Function ejecutarComando is a serie of
IF (teclaMando==1) THEN CALL <your_function> ELSEIF (teclaMando==2) ...
sequence

3. And finally, the code inside <your_function> (in my code "ponerSituacionLongitudinal" and "ponerSituacionTransversal") could execute a motion (s in my code) or execute any other RoboPlus code

Hope it helps you

Having the motion files is really easy. Basically, you only need a endless loop to read data from the remote control and execute the motions (or others orders) you want depending on the pushed button. I have attached parts of the code (in spanish) from an example I created:
1. Inside the endless loop:
teclaMando means remoteCommandKey (pushed)
ejecutarComando means executeCommand
Before the endless loop it does some initialization.

2.Function ejecutarComando is a serie of
IF (teclaMando==1) THEN CALL <your_function> ELSEIF (teclaMando==2) ...
sequence

3. And finally, the code inside <your_function> (in my code "ponerSituacionLongitudinal" and "ponerSituacionTransversal") could execute a motion (s in my code) or execute any other RoboPlus code

Hope it helps you
