El Cheapo Linear Actuator

3D Printed Linear Actuator

MG995 Servo Linear Actuator from Stewart Rap on Vimeo.

3D Models


Snag the STLs and OpenSCAD files from:

Thingiverse ›

Code


You don’t need any special code if you’re just using a stock MG995 servo.

But if you’re hacking your servo for continuous rotation and adding a potentiometer and a limit switch, check the code for some ideas:


Interrupt.h is basically a C++ wrapper for the C interrupts generated by the limit switch and potentiometer.
LinearActuator.h is sort of a driver for the linear actuator. It extends Interrupt.h and figures out what interrupt was called using the handle() method.

Code ›