22#ifndef PQ_ARCH_SUPPORTS_SERVO
23#if (defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_SAM) || \
24 defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_NRF52))
25 #define PQ_ARCH_SUPPORTS_SERVO 1
27 #define PQ_ARCH_SUPPORTS_SERVO 0
31#if PQ_ARCH_SUPPORTS_SERVO
51 virtual float put(
float value);
54 uint8_t
pin()
const {
return _pin; }
111 virtual void begin();
Servo-motor absract object.
Definition PqServo.h:39
virtual float put(float value)
Pushes value into the unit.
Definition PqServo.cpp:32
virtual void activate()
Activates the servomotor (default).
Definition PqServo.h:63
uint8_t pin() const
Returns the pin this servomotor is attached to.
Definition PqServo.h:54
virtual void setIsActive(bool active)
Activates or deactivates the servomotor.
Definition PqServo.cpp:40
virtual bool isActive()
Returns true if the servomotor is active.
Definition PqServo.h:57
virtual void deactivate()
Deactivates the servomotor.
Definition PqServo.h:66
An analog analog source that contains a value constrained to a finite range (typically in [0,...
Definition PqCore.h:482
Continuous servo-motor.
Definition PqServo.h:96
virtual void invert()
Sends servomotor in opposite direction.
Definition PqServo.cpp:78
virtual void stop()
Stops the servo-motor.
Definition PqServo.cpp:72
The main Plaquette static class containing all the units.
Definition PqCore.h:63
static Engine & primary()
Returns the main instance of Plaquette.
Definition PqCore.cpp:30
Standard servo-motor (angular).
Definition PqServo.h:76
virtual float putAngle(float angle)
Sets the servomotor position to a specific angle between 0 and 180 degrees.
Definition PqServo.cpp:55
virtual float getAngle()
Return the current angular angle in [0, 180].
Definition PqServo.cpp:61
Engine * engine() const
Returns the engine that owns this unit.
Definition PqCore.h:420