@@ -62,21 +62,20 @@ You can create custom control routines using the coder in the `Coder` tab. To do
6262following functions (the so-called 'Coder API'):
6363- ` self.enable_motor() ` : arm the motor
6464- ` self.disable_motor() ` : disarm the motor
65- - ` self.move_down(distance_mm, speed_mm_s, acceleration_mm_s =None) ` : move the motor down by supplying the following parameters:
65+ - ` self.move_down(distance_mm, speed_mm_s, acceleration_mm_s2 =None) ` : move the motor down by supplying the following parameters:
6666 - ` distance_mm ` : the distance in mm to move down
6767 - ` speed_mm_s ` : the speed in mm/s to move down
68- - ` acceleration_mm_s ` : (optional) the acceleration in mm/s^2 to move down (leave empty for default acceleration)
69- - ` self.move_up(distance_mm, speed_mm_s, acceleration_mm_s =None) ` : move the motor up by supplying the following parameters:
68+ - ` acceleration_mm_s2 ` : (optional) the acceleration in mm/s^2 to move down (leave empty for default acceleration)
69+ - ` self.move_up(distance_mm, speed_mm_s, acceleration_mm_s2 =None) ` : move the motor up by supplying the following parameters:
7070 - ` distance_mm ` : the distance in mm to move up
7171 - ` speed_mm_s ` : the speed in mm/s to move up
72- - ` acceleration_mm_s ` : (optional) the acceleration in mm/s^2 to move up (leave empty for default acceleration)
72+ - ` acceleration_mm_s2 ` : (optional) the acceleration in mm/s^2 to move up (leave empty for default acceleration)
7373- ` self.home_motor(home_up=True) ` : home the motor, necessary for moving to absolute positions
7474 - ` home_up ` (optional) if the motor was homed at the top limit switch, set to ` True ` , if homed using the bottom limit switch, set ` False `
75- - ` self.move_to_position(self, position_mm, speed_mm_s=None, acceleration_mm_s2=None, home_up=True ) ` : move the motor to an absolute position in mm
75+ - ` self.move_to_position(position_mm, speed_mm_s=None, acceleration_mm_s2=None) ` : move the motor to an absolute position in mm
7676 - ` position_mm ` : the absolute position in mm to move to
7777 - ` speed_mm_s ` : (optional) the speed in mm/s to move to the absolute position (leave empty to use the last set speed)
7878 - ` acceleration_mm_s2 ` : (optional) the acceleration in mm/s^2 to move to the absolute position (leave empty to use the last set acceleration)
79- - ` home_up ` : (optional) if the motor was homed at the top limit switch, set to ` True ` , if homed using the bottom limit switch, set ` False `
8079- ` self.sleep(seconds) ` : wait for a number of seconds
8180
8281For example, to move the motor down by 10 mm at a speed of 5 mm/s, then wait 5 seconds, and then move up by 10 mm at 2 mm/s,
@@ -87,13 +86,13 @@ you can write the following code in the `Coder` tab:
8786self .enable_motor()
8887
8988# Move down
90- self .move_down(10 , 5 )
89+ self .move_down(distance_mm = 10 , speed_mm_s = 5 )
9190
9291# Wait for 5 seconds
93- self .sleep(5 )
92+ self .sleep(seconds = 5 )
9493
9594# Move up
96- self .move_up(10 , 2 )
95+ self .move_up(distance_mm = 10 , speed_mm_s = 2 )
9796
9897# Disarm the motor
9998self .disable_motor()
0 commit comments