
Mulberry
USA
Asked
— Edited
Afternoon All
I'm finally getting back to my project after many months. I searched the forum on my question but I thought I would post here so I'd have the most recent information
So I need to add controls for seven 12 v motors (4 are actuators).
Does EZ still only allow one motor control per project w/o doing scripts?
If not, are there plans in the future updates to allow this?
Thanks,
D. Scott
I am unclear as to what you mean by "motor control". Are you referring to the AutoPosition with Movement Panel control?
I think the OP is asking about hbridge? If so, it's a misunderstanding of movement panels.
A robot can have only ONE movement panel, for obvious reasons. This allows the project to know what forward means. Or what left means. Or what any direction means. It's not a limitation, it's a logical design.
So the answer to your question is much simpler than you are assuming. You're going to go "doh!" When I tell you...
But the answer is to create an ezscript for each hbridge - because you absolutely do not have 12 hbridges for moving your robot - so obviously you don't need 12 hbridge movement panels
Create a script for each hbridge.
More information about movement panels can be discovered in the learn section.
I still think there are use cases for multiple movement panels (robot swarms, master/drone, snakebots maybe) but I also understand the challenges that brings to the automatic script controls like forward/reverse as well as automatic linkage to joystick, keyboard, and wii controls.
Perhaps another plugin idea for me to start poking at if for nothing else than to prove the point.
I am really hoping sometime this summer to find the time to learn some C# and start making plugins. I keep saying that, but it will happen eventually
Alan
I agree, a second one would be ideal. At least for me. I have a crazy idea i'd like to do with Cy. While I am using the parallax HB25s controller/motors , I have my Movement Panel calibrated for "Indoor" use (wish the motors would run on better sync-another issue) but I also want to run Cy "Outdoors". Being outdoors means the motors would be able to run alot faster. So slow indoors, but fast outdoors. I would too love ot have two movement panels to be able to setup for either mode. Then I would use a photocell to detect the different light between indoor and outdoor automatically (in theory). Unless someone has already done a script to do two or more motor speeds? confused
Adding a second Movement Panel is trying to insert a circle peg into a square hole, because it's an impossible and irrational solution, it literally cannot be done because it is absolutely impossible - it is impossible to have two movement panels because Forward() would have absolutely no relationship to a movement direction. The camera control would have no idea how to move to follow an object. The joystick control would have no idea how to move the robot. etc etc etc etc etc
An example of how impossible it is to add a second Movement Panel is..
Also, having a second hbridge Movement Panel (even if it were to somehow be possible) would not assist the OP request. This is because the Movement Panel contains buttons for FORWARD, LEFT, RIGHT, REVERSE, and STOP. The HBridges in the OP configuration do not have 4 channels, neither do they control wheels that apply to any direction - because it is controlling actuators, as specified.
A direction is FORWARD, LEFT, RIGHT, REVERSE, STOP. Those are directions, much like how your body would move in the real world.
Due to the OP mentioning "actuators", the solution is to use scripts.
Now, there may be an appearance concern of having multiple scripts on the screen - in that case, use the Mobile Interface and have a nice control panel.
I can no doubt create additional HBridge controls that are not registered as movement panels, but that would not be the solution? Specifically when you're ability to use the Mobile Interface Builder provides a much more elegant and visual appealing solution.
@RoboHappy, to control speed of HBridges, the PWM controls the speed. This is documented in the HBridge Movement Panel (PWM) manual. You can access manual pages for any control by pressing the ? (question mark) next to the X (close) button. Here is a direct link for convenience: https://synthiam.com/Tutorials/Help.aspx?id=192
And to understand how PWM works, here is the manual page for the PWM control (which is also the PWM() command): https://synthiam.com/Tutorials/Help.aspx?id=164
For additional assistance, please consult this short video demonstrating how to add two buttons to the Mobile Interface to control an HBridge:
The assumption for this tutorial is:
I'm a bit confused. Is this discussion aimed at the use of the mobile app only?
This discussion is using the mobile interface builder as an example to present a nicer interface in ARC project for running scripts - as explained in my response regarding "an elegant and visual appealing solution" - as quoted