Home

Awesome

<div align = center>

LightweightServo

Badge License: GPLv3     Badge Version     Badge Commits since latest     Badge Build Status     Badge Hit Counter <br/> <br/> Stand With Ukraine

Part of the Arduino library ServoEasing

Button Changelog

</div>

If you find this library useful, please give it a star.

🌎 Google Translate

Small servo library for Arduino

This library is contained in the Arduino SevoEasing library.

Usage

As simple as this:

#include "LightweightServo.hpp"

void setup() {
    // no initialization required for LightweightServo :-)
    // or use manual initialization (and compiler macro "DISABLE_SERVO_TIMER_AUTO_INITIALIZE") to save additional 60 bytes program memory
    // initLightweightServoPin9();
}

void loop() {
    write9(0);
    delay(1000);
    write9(180);
    delay(1000);
}

API

Compile options / macros for this library

To customize the library to different requirements, there are some compile options / macros available.<br/> Most macros must be defined in your program before the line #include <LightweightServo.hpp> to take effect.<br/> Modify them by enabling / disabling them, or change the values if applicable.

NameDefault valueDescription
DISABLE_SERVO_TIMER_AUTO_INITIALIZEdisabledSaves up to 60 bytes flash memory. You must then use the init function initLightweightServoPin9And10() or initLightweightServoPin9_10() manually.