ServoBug

{% trans 'Sorry, your browser does not support canvas -- please either update your browser or submit your requirements by phone or email.' %}

Accelerometer

Avatar for PiGraham PiGraham

This script drives an RC servo with PWM. The buttons A and B change the position (pulse width). Pulse output is 1 to 2ms wide repeating every 20ms. Timing is achieved with busy wait loop that simply repeats the output N times. Several output timing loops could be used to control more servos. Don't power servos from the bug! Use separate batteries to the servo power wires. Connect the output leg direct to the servo control line. See it in action here https://youtu.be/bepVOPVZwmA

Report this project
Back to top