In order for Sketchy to know where it was last positioned on power up, each time move_to_point(), maybe step()?, is called, you should write the indicated coordinate as the string <x>,<y> to a file called /data/last_position and set x_pos and y_pos based on the value of this file on power up.
Currently when Sketchy powers up, it resets its internal
x_pos
andy_pos
variables to0
without regard for where the plotter mechanism is actually positioned.In order for Sketchy to know where it was last positioned on power up, each time
move_to_point()
, maybestep()
?, is called, you should write the indicated coordinate as the string<x>,<y>
to a file called/data/last_position
and setx_pos
andy_pos
based on the value of this file on power up.