Asked — Edited

Ad Movement To Forwart()

i cant seems to ad a movement to script movement panel?

Forward( 255,5000 ) sleep(1000) ControlCommand("Auto Position", AutoPositionAction, "Armwalk")

anyone thank you


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

#1  

Are you sure you still have a sperate "movement panel"

You can have a "Movement Panel" and then "Auto Position" panels OR you can have an "Auto Position Movement Panel" which does both together - which I think is what most folks use and what most examples show.

If you are using the "Auto Position Movement Panel" then you need to use:


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

Let us know what you are using and which robot. And remember you can check the "Cheat Sheet" under the EZ-Script control to see what commands are available to you.

PRO
Belgium
#2  

hi justin

i am using a seperate movement.

User-inserted image

PRO
Belgium
#3  

i am using the mini meccanoid version.i dont have commands in the cheat sheet. only in the speech recog are controls .forwart/backwart/left&right.

PRO
Synthiam
#4  

I think what you want is an action to run when the robot is moving forward?

#5  

I gotcha now. Is the problem the action or the going forward? If it is going forward I'd do this:

What if you change your script to this to make this work for now so you are doing one thing at a time (get the forward actions working, then add the other action):


Forward( 255,5000 )

If you run that you should see the forward green arrow on the Movement Panel light up and robot move forward. If it does not, my guess would be the value "255" is maybe too high for the way your robot is configured. If that is case try dropping the value down until it moves forward. LIke try "250, then 245, 240...you get the idea.

PRO
Belgium
#6  

dj

yes .i made two motion.i wanted to ad when the robot go's forwart and stop.

justin

i have that ,and it works.but not the motions i made.only forwart works.

User-inserted image

PRO
Synthiam
#7  

Use this control...

https://synthiam.com/Support?id=47

and add the code that will run when the Forward() is called. i.e.


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

You can also have the code tell the AutoPosition to stop with the Stop motion

PRO
Belgium
#8  

he will only move once,then nothing.i dont see I.E

User-inserted image

PRO
Synthiam
#9  

Your action in Auto Position is not set to repeat if it only runs once

Why does your code tell it to right or reverse in the right or reverse? You're telling the command to do the command when it does the command to do the command that does the command in the command when the command runs the command to do the command from the command with the command.... for ever

My instructions did not instruct you to enter the movement into the movement of the movement. You've created an infinite loop. Careful, the universe is a fragile place:)

Read the manual for the control before using it. Here is a copy from the manual from the link i provided in my previous post.

User-inserted image

PRO
Belgium
#10  

this is arkward.all i see is 10 times the word command,and now am lost. i dont have action forwart/backwart/left&right in the auto position. the action turn head left&right is repeat also the action move arms is repeat. so ok something is not right in the movement.thats why the wheels didn turn of eek. infinite means forever? says buzz lightyear.

PRO
Synthiam
#11  
  1. Set the ARMWALK ACTION in your Auto Position for REPEAT

  2. Edit the FORWARD script in the MOVEMENT SCRIPT to the following...


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

  1. Edit the STOP script in the MOVEMENT SCRIPT to the following...

ControlCommand("Auto Position", AutoPositionStop)

that's it. Do not add code anywhere else. Remove the RIGHT() and LEFT() and all other code you've had.

PRO
Belgium
#12  

ok that works.but only for one command.thank you for your patients

dj&justin

PRO
Belgium
#13  

found it.i put the two motions together.armwalk&lookleft&right.

#14  

That is pretty cool! And before now, I didn't know MOVEMENT SCRIPT worked that way. :)

PRO
Belgium
#15  

i learned tree new things.i am very happy.these mini meccanoids are very good to start robotics.i notest one thing do.the speed bar dont stay in position you , set it for.

User-inserted image

PRO
Synthiam
#16  

paste the code in your movement script

PRO
Belgium
#17  

dj thank you again. blush

PRO
Synthiam
#18  

i asked you a question lol - show me the code you put into the script movement control

PRO
Belgium
#19  

ah didn see that. i try pwm(D0,90) but it dont work?

PRO
Belgium
#20  

ah i see the pwm change to 89 percent whits is correct. the bar in the H-bridge dont move

PRO
Synthiam
#21  

I can’t help unless you post the code of the script movement control

You cannot use pwm() and expect the speed to change. You set the speed and the pwm will change. The speed controls the pwm or what ever kind of speed the Movement Panel uses.

Use the speed() and let the Movement Panel do its own thing. Don’t override it

PRO
Belgium
#22  

dj

sorry i dont understand coding.do you have an excample?

PRO
Synthiam
#23  

Why don't you use blockly? It sets the speed for you.

PRO
Belgium
#24  

any coding is diff for me.but i will see if i can notest something in blockly.