Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
Public Member Functions | |
ServoChannel () | |
Instantiate a servo channel object has to be attached to a pin before using. More... | |
bool | attach (uint8 pin) |
attach servo channel to a unused pin More... | |
bool | detach () |
detaches servo channel pin will be set to input More... | |
bool | setDegree (int8 value) |
set value in servo degree input value is mapped between min and max value More... | |
bool | setMaxValue (uint32 maxValue=DEFAULTMAXVALUE) |
set max value for output timing More... | |
bool | setMinValue (uint32 minValue=DEFAULTMINVALUE) |
set min value for output timing More... | |
uint32 | getMaxValue () const |
simple getter More... | |
uint32 | getMinValue () const |
simple getter More... | |
uint32 | getValue () const |
simple getter More... | |
bool | setValue (uint32 value) |
set value for output More... | |
uint8 | getPin () const |
simple getter More... | |
ServoChannel::ServoChannel | ( | ) |
Instantiate a servo channel object
has to be attached to a pin before using.
bool ServoChannel::attach | ( | uint8 | pin | ) |
attach servo channel to a unused pin
pin | GPIO to use pin will be set to output |
bool | True on success |
bool ServoChannel::detach | ( | ) |
detaches servo channel pin will be set to input
bool | True on success |
|
inline |
simple getter
uint32 | max time in us |
|
inline |
simple getter
uint32 | min time in us |
|
inline |
simple getter
uint8 | attached pin for this channel |
uint32 ServoChannel::getValue | ( | ) | const |
simple getter
uint32 | actual value in us |
bool ServoChannel::setDegree | ( | int8 | value | ) |
set value in servo degree
input value is mapped between min and max value
value | is limited between -90 and 90 degrees |
bool | True on success |
bool ServoChannel::setMaxValue | ( | uint32 | maxValue = DEFAULTMAXVALUE | ) |
set max value for output timing
value | time in us for maximum output of this channel has to be larger than min value |
bool | True on success |
bool ServoChannel::setMinValue | ( | uint32 | minValue = DEFAULTMINVALUE | ) |
set min value for output timing
value | time in us for minimum output of this channel has to be smaller than max value |
bool | True on success |
bool ServoChannel::setValue | ( | uint32 | value | ) |
set value for output
value | time in us for actual output of this channel has to be smaller than max-min value |
bool | True on success |