A friend and I are in high school and we built a bigger version of JD but with a two wheel drive (instead of the legs and their servos) for our graduation project. To control the wheels we're using two IFI Victor 884 speed controllers. These Victors are being connected to the I/O board with PWMs.
We want to script it so that when we tell it to go forward/back/right/left (say, we hit the arrow keys in the Auto Position panel in the EZ Builder IDE), it does that. We don't have a joystick at the moment, we just have the computer controls and the mobile app controls.
It seems like a relatively simple task, but we're not sure how to go about it - using the PWM ports that the Victors are connected to, to move the two wheels in a direction. Our questions are at the end of this post (sorry it's a bit lengthy, we're hoping that if someone comes across the same problem, they can use what we did to resolve some of it).
This is what we've figured out so far:
If we go onto the EZ-Robot panel, and click on the design icon at the bottom, we can re-arrange the way that JD looks on the board and add our own continuous servos (aka Victors). We synced the bit library and added two continuous rotation servos to the picture by double clicking. We got rid of JD's assembly by right clicking on the leg parts once they were clicked/highlighted once. Then we hit save.
After that, we added two continuous servo controls. We adjusted their settings so that they were connected to the two ports on the control board that we connected the Victors to. We made the forward value 1, and the reverse value 180. After doing this, clicking on the arrows in these two servo control panels made the wheels turn forward and back. This step allowed us to individually test our wheels, and make sure they were running properly.
This page of the tutorials helped us out a bit with the next part: https://www.ez-robot.com/Tutorials/Help.aspx?id=12
We exited out of the Auto Position panel because it would not let us have two movement panels open at the same time. With the custom movement panel, we were able to simply click the arrows and it made the wheels move. Forward with the forward arrow, Reverse with the opposite arrow... and so on.
However, we really want the Auto Position panel there because we're not sure how to bring it back. We find the actions it preforms very valuable (waves, and YMCA dancing and so on).
So we need to program the AutoPosition panel so that when we hit forward, the wheels go forward (and so on). We kinda made it go forward (auto position settings > Actions > Forward > Action Script > Edit Script > Servo(d#, 1); previously in the Forward action there were Walking steps, for JD)... but then it never stopped going forward, no matter what we clicked. Are we going in the right direction, or is the movement script config panel the one we need to adjust? (http://www.ez-robot.com/Tutorials/Help.aspx?id=47 ... but then what code would we put there to make it move?)
Also, we're not sure how to make the wheel movements slower (we think it's servospeed(d#, 10), but not sure where to add this line of code?).
If anyone could help us out, that would be awesome.