With this planar robot you can play with forward and inverse kinematics and control algorithms.
The second and third version are based on the Teensy 3.2 microcontroller, stepper motors and limit switches.
The third version has two additional holes to attach two incremental encoders connected to the robot joints using timing GT2 belts.
The first version involves the closed loop control of a DC motor coupled with an encoder and at the same time the kinematics concepts in robotics.
The basic program of the second version uses the teensystep.h library:
https://luni64.github.io/TeensyStep/index
Three libraries are needed to start running the program with the optical mouse:
If you want to control the robot with the mouse (It can be controlled with many other interfaces like touchscreens, joysticks or sending trajectories form a vector) you need this library:
https://github.com/zapmaker/OptiMouse
The motor driver library (Other motor driers can be used such as L298N):
https://github.com/pololu/dual-mc33926-motor-shield
The PID Controller library to control the motor position in closed loop with the encoder position:
and https://hackaday.io/project/26963-post-stroke-spasticity-rehab-helper