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:57
uint8_t pin() const
Returns the pin this servomotor is attached to.
Definition PqServo.h:54
virtual bool isActive()
Returns true if the servomotor is active.
Definition PqServo.h:63
virtual void deactivate()
Deactivates the servomotor.
Definition PqServo.h:60
An analog analog source that contains a value constrained to a finite range (typically in [0,...
Definition PqCore.h:444
Continuous servo-motor.
Definition PqServo.h:96
virtual void reverse()
Sends servo-motor in reverse mode.
Definition PqServo.cpp:69
virtual void stop()
Stops the servo-motor.
Definition PqServo.cpp:63
The main Plaquette static class containing all the units.
Definition PqCore.h:60
static Engine & primary()
Returns the main instance of Plaquette.
Definition PqCore.cpp:31
Standard servo-motor (angular).
Definition PqServo.h:73
virtual float putAngle(float angle)
Sets the servomotor position to a specific angle between 0 and 180 degrees.
Definition PqServo.cpp:46
virtual float getAngle()
Return the current angular angle in [0, 180].
Definition PqServo.cpp:52
virtual void center()
Re-centers the servo-motor.
Definition PqServo.h:92
Engine * engine() const
Returns the engine that owns this unit.
Definition PqCore.h:382