arduino-libraries / Servo

Servo Library for Arduino
http://arduino.cc/
GNU Lesser General Public License v2.1
252 stars 262 forks source link

Inverted pulse #57

Open Koryphon opened 4 years ago

Koryphon commented 4 years ago

Hello,

I made a minor add to the Servo library (and at that time only for AVR) to output an inverted pulse (the output signal is at rest at VCC and the pulse is at GND). The goal is to drive a 6V powered servo, the pulse being amplified and inverted by a NPN transistor. 2 methods are added to the servo class: setInvertedPulse and isInvertedPulse. If you are interested in the add, I can extend it to the other supported platforms and I can do a PR.

Let me now.

Best regards