Hello, i hope somebody give me at least a guide or adivce for doing this.
im building and hexapod.
what i want to do is:
create forward, backward motion etc⌠using maestro control center because its easier to position the servos exactly where you want.
then copy the forward⌠sequence to Script.
and here is where arduino comes.
i wonder if there is way i can send the whole script to the pololu board using serial comunicaction or another way you know?.
THIS IS SOMETHING DIFFERENT I COULD DO ALSO
I have been reading that is posible to for example: save the script to the board using maestro software, then from arduino send the stop script or restart script command using serial comunication.;
but i see the command expects a rutine parameter , is there a way to start the whole sequence?
i could do 4 sequences for motion in all directions and then from arduino call the sequence depending on what the user inputs.
There is no way to load a script onto the Maestro from an Arduino; however, there are a couple of other options that you might consider. You could translate your sequences into serial commands in your Arduino sketch and have the sequences handled by the Arduino. You can find a list of Maestro serial commands for servos in the âSerial Servo Commandsâ section of the Maestro controllerâs userâs guide.
Alternatively, you could make your four sequences using the âSequenceâ tab of the Maestro Control Center and use the âCopy All Sequences to Scriptâ button. Then you can use the âRestart Script at Subroutineâ serial command to trigger the subroutines using your Arduino. Please note that you might need to edit the script slightly since the subroutines will end with a return statement by default (simply changing the return to quit or repeat might work depending on the behavior you want. Information about this command can be found in the Serial Script Commands" section of the Maestro controllerâs userâs guide.
If you try this and run into problems, you could post what you have so far, and I would be happy to take a look.
Yep i have already done this , but this would be like my last option.
This is what im doing right now.
I create the sequence for forward motionâ> generate the script and save it to .txt(for later edition)
Then with all the sequences done, i put them all together in one script.
I just add sub forward where it says begins - quit and APPLY SETTINGS ON THE MAESTRO CONTROL CENTER
Then i look at the compiled code and see the address of my sequence and call it from arduino and to my surprise it worked at the first try. But sequence repeats and repeats and never stops(i suppose its because of the repeat before quit, havent try removing it yet, cuz i want it like that).
So in my control app, i designed another button for stopping the hexapod, but it doesnt work, i dont know why.
Here is the script(only has forward and left sequences)
I did not see anything obviously wrong with your code, so I tried modifying it slightly so I could use the Arduino Serial Monitor to set the bluedat variable, and it seems to be working correctly for me. I can send 0 or 1 and it will run the respective subroutine in a loop until I send 4, which stops the script. From your code, it looks like you are using some kind of Bluetooth module to send signals to the Arduino. You might try simplifying your system so you can be sure your commands are working properly before adding in extra devices.