Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
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

#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):

Code:


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
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...

Code:


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


3) Edit the STOP script in the MOVEMENT SCRIPT to the following...

Code:


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
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.