Dual Hbridge W/PWM icon Dual Hbridge W/PWM Dual H-Bridge w/PWM movement panel: control two DC motors' direction and speed via EZ-B PWM for responsive forward/reverse/turning. Try it →
Germany
Asked — Edited
Resolved Resolved by DJ Sures!
Auto Position Action In Random Modus

Auto Position Action In Random Modus

Dear EZ-Robot Team and Fans,

If my camera notice something.. I want to play an action from auto position.. but not every time the same.. I want a Random-Modus for all my actions.. I found nothing to play actions random ? I hope someone can help me.

regards


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#1  

Programming.... Start watching the robot program to learn how to start programming. Here's an example of how your program would look.

Blockly:

User-inserted image

EZ-Script:

User-inserted image


$RandomAction = GetRandom(0, 5)

if ($item = 0)

  ControlCommand("Auto Position", "AutoPositionAction", "Be Awesome")

elseif ($item = 1)

  ControlCommand("Auto Position", "AutoPositionAction", "Dance")

elseif ($item = 2)

  ControlCommand("Auto Position", "AutoPositionAction", "Jump")

elseif ($item = 3)

  ControlCommand("Auto Position", "AutoPositionAction", "Smile")

elseif ($item = 4)

  ControlCommand("Auto Position", "AutoPositionAction", "Super Action")

else

  ControlCommand("Auto Position", "AutoPositionAction", "Wave")

endif
Author Avatar
Germany
#2  

thank you :-)

its working fine for me !