Skip to main content
Posted in

I have finally installed slim and got everything working. I don't quite understand how to use slim, it seems easy enough but maybe I'm just dense. I look at the examples and there is a lot lines that start with echo, what's that?

     #motor settings
echo Motor settings
echo---> Base speed=5, ramp=24,dir=0

motor 0 enable 1
motor 0 dir 0
motor 0 steps 5
motor 0 ramp 24

I can figure out some of this but what is echo used for?

Thanks

Hi RC, echo just echoes

Matt's picture

Hi RC,

echo just echoes everything after echo to the command prompt. It makes it easier to follow a program during execution. The # is a comment mark.
In the above example, in the second echo line, the parameters of the script (direction = 0, speed = 5 steps, ramp = 24 are stated.

Matthias

So does it actually do

So does it actually do anything to the motor setup lines below or is it just for the person writing the code. Another way of commenting?

Also is base speed the velocity of the steps? base speed 5, move 100 steps kinda thing.

Cheers

Remember, you can always type

Remember, you can always type help <command>, if you wonder what <command> does =)

e.g.:

[1]> help echo
 
        echo <word> <word> <word> ...
       
  Prints back some words to the screen.  Used when scripting.
[2]>

!c