Continuous servo-motor.
More...
#include <PqServo.h>
|
| | ContinuousServoOut (uint8_t pin, Engine &engine=Engine::primary()) |
| | Constructor for a continuous rotation servo-motor.
|
| |
|
virtual void | stop () |
| | Stops the servo-motor.
|
| |
|
virtual void | reverse () |
| | Sends servo-motor in reverse mode.
|
| |
| virtual float | put (float value) |
| | Pushes value into the unit.
|
| |
|
uint8_t | pin () const |
| | Returns the pin this servomotor is attached to.
|
| |
|
virtual void | activate () |
| | Activates the servomotor (default).
|
| |
|
virtual void | deactivate () |
| | Deactivates the servomotor.
|
| |
|
virtual bool | isActive () |
| | Returns true if the servomotor is active.
|
| |
| virtual float | get () |
| | Returns value in [0, 1].
|
| |
| virtual float | mapTo (float toLow, float toHigh) |
| | Maps value to new range.
|
| |
|
virtual void | clearEvents () |
| |
|
float | seconds () const |
| | Returns engine time in seconds.
|
| |
|
uint32_t | milliSeconds () const |
| | Returns engine time in milliseconds.
|
| |
|
uint64_t | microSeconds () const |
| | Returns engine time in microseconds.
|
| |
|
unsigned long | nSteps () const |
| | Returns number of engine steps.
|
| |
|
float | sampleRate () const |
| | Returns engine sample rate.
|
| |
|
float | samplePeriod () const |
| | Returns enginesample period.
|
| |
|
| operator float () |
| | Object can be used directly to access its value.
|
| |
|
| operator bool () |
| | Operator that allows usage in conditional expressions.
|
| |
|
|
static bool | analogToDigital (float f) |
| | Converts analog (float) value to digital (bool) value.
|
| |
|
static float | digitalToAnalog (bool b) |
| | Converts digital (bool) value to analog (float) value.
|
| |
|
| virtual void | begin () |
| |
|
virtual void | step () |
| |
| virtual bool | eventTriggered (EventType eventType) |
| | Returns true iff an event of a certain type has been triggered.
|
| |
|
virtual void | onEvent (EventCallback callback, EventType eventType) |
| | Registers event callback.
|
| |
|
Engine * | engine () const |
| | Returns the engine that owns this unit.
|
| |
|
|
uint8_t | _pin |
| |
|
float | _value |
| |
◆ ContinuousServoOut()
Constructor for a continuous rotation servo-motor.
- Parameters
-
◆ begin()
| void pq::ContinuousServoOut::begin |
( |
| ) |
|
|
protectedvirtual |
◆ eventTriggered()
| virtual bool pq::Unit::eventTriggered |
( |
EventType |
eventType | ) |
|
|
inlineprotectedvirtualinherited |
◆ get()
| virtual float pq::AnalogSource::get |
( |
| ) |
|
|
inlinevirtualinherited |
◆ mapTo()
| virtual float pq::AnalogSource::mapTo |
( |
float |
toLow, |
|
|
float |
toHigh |
|
) |
| |
|
inlinevirtualinherited |
◆ put()
| float pq::AbstractServoOut::put |
( |
float |
value | ) |
|
|
virtualinherited |
Pushes value into the unit.
- Parameters
-
| value | the value sent to the unit |
- Returns
- the new value of the unit
Reimplemented from pq::Chainable.
The documentation for this class was generated from the following files:
- /home/tats/Documents/workspace/Plaquette/src/PqServo.h
- /home/tats/Documents/workspace/Plaquette/src/PqServo.cpp