All the source code is available for free at the start page or on Mbed site.
https://os.mbed.com/users/F4HDK/code/scribe_stepper_2/
The 2D movements are made at constant speed.
Description of algorithm, from the bottom low level tasks to upper level tasks.
clk_stepper :
Pulses for stepper motor controllers are generated with interrupts. The function inside interrupts makes 3 things : it pulses the pulse output of the appropriate stepper motor controller; it updates the angular position of each motor (at each step); and it sets a timer for the next pulse interrupt, according to period requested by higher level task
setpos_ang :
it computes the period of pulses and direction of each stepper motor, with angle consign, and delay. These movements are executed at constant angular position. For most of the movements, this function is only used for very short distances : 1mm.
goto_2D_short :
contains the reverse kinematics algorithm. For each 2D position (X, Y), it computes the angular position of each articulation.
Goto_2D_line and circle_2D :
decomposes the segment or arc requested into small segments of 1mm
print_single_char :
for just one character, it reads its font definition, prints the character at the current character position with goto_2D_line and circle_2D, and update the next character position.
print_string :
prints a character string, and manages line return (without word cut), and line clearing.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
What computer language did you use? and also I think this robot is amazing!!
Are you sure? yes | no