Generating Arduino code with PoMoCo 2.0

PoMoCo has a feature to generate Arduino code for use with your controller. You can find the button to do so in the upper-left hand corner, above the moves:

Select Arduino Code Generate
This will show the Record Arduino Moves dialog:
Record Arduino Code
The instruction to generate the code for Arduino are in the box, but here they are for reference:
How to record a move for Arduino:
0.) (Optional) Choose a move name in the box above
1.) Press the red record above button above
2.) Run a move or multiple moves in PoMoCo
3.) Press the black stop button above
4.) Copy the generated move code to the Arduino IDE

When we follow these steps for the move “Reset” with an  uncalibrated Hexy using a Servotor32, we get the following code generated:

The code is mostly a lot of numbers that indicate which servos are moving at what times to what positions. These numbers are stored in the program memory of the controller so that ram isn’t ever utilized. This move shows it uses 672 bytes to store, or 0.65KB. The Servotor32 for example has 28KB of usable program memory space, so you can store plenty of moves on a Servotor32 without doing any modifications.

If you were to copy the move into the default firmware with some modification, and include the move function in the main loop, you would get something like this. This code runs the move every 5 seconds in a loop: