Start off with lower primitives. In Logo, for instance, have a "draw at pixel" command. Have a way of recording a state. The student can then recreate the notion of pen on/off and pen placement and movement on top of the basic primitive plus a conditional. Pen is moving from A to B, if it's on, it draws along the way, otherwise it just moves. Some challenges with the math involved in movement, but it's solving a linear equation. Minor issue with rounding, perhaps allow the numbers to be floating point and let the renderer handle
which pixel to draw. Everything up to the external turtle can be handled in this same way as long as they have the primitives.
Handling hardware, give them primitives to write to and read from devices. Build up the code on top of that to handle more complex situations like manipulating external servos over a serial port.