Control code for a reprap mounted microscope