uStepper S
uStepperServo.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * File: uStepperServo.h *
3 * Version: 2.2.0 *
4 * Date: September 22nd, 2020 *
5 * Authors: Thomas Hørring Olsen *
6 * Emil Jacobsen *
7 * *
8 *********************************************************************************************
9 * (C) 2020 *
10 * *
11 * uStepper ApS *
12 * www.ustepper.com *
13 * administration@ustepper.com *
14 * *
15 * The code contained in this file is released under the following open source license: *
16 * *
17 * Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International *
18 * *
19 * The code in this file is provided without warranty of any kind - use at own risk! *
20 * neither uStepper ApS nor the author, can be held responsible for any damage *
21 * caused by the use of the code contained in this file ! *
22 * *
23 ********************************************************************************************/
34 #ifndef _USTEPPERSERVO_H
35 #define _USTEPPERSERVO_H
36 
37 #include <Arduino.h>
38 #include <inttypes.h>
39 
44 {
45  private:
47  uint8_t pin;
49  uint8_t angle;
51  uint16_t pulse;
53  uint8_t min16;
55  uint8_t max16;
56 
60 
62  static uStepperServo* first;
63  public:
64 
72  uStepperServo();
73 
85  uint8_t attach(int pinArg);
86 
92  void detach();
93 
101  void write(int angleArg);
102 
111  void setMinimumPulse(uint16_t t);
112 
121  void setMaximumPulse(uint16_t t);
122 
130  static void refresh();
131 };
132 
133 #endif
uStepperServo::refresh
static void refresh()
Updates servo output pins.
Definition: uStepperServo.cpp:154
uStepperServo::attach
uint8_t attach(int pinArg)
Attaches the servo motor to a specific pin.
Definition: uStepperServo.cpp:120
uStepperServo::detach
void detach()
Detaches the servo motor from the uStepper.
Definition: uStepperServo.cpp:132
uStepperServo::write
void write(int angleArg)
Specify angle of servo motor.
Definition: uStepperServo.cpp:143
uStepperServo::setMaximumPulse
void setMaximumPulse(uint16_t t)
Sets the maximum pulse.
Definition: uStepperServo.cpp:115
uStepperServo::setMinimumPulse
void setMinimumPulse(uint16_t t)
Sets the minimum pulse.
Definition: uStepperServo.cpp:110
uStepperServo::next
class uStepperServo * next
Definition: uStepperServo.h:59
uStepperServo::first
static uStepperServo * first
Definition: uStepperServo.h:62
uStepperServo
Prototype of class for ustepper servo.
Definition: uStepperServo.h:44
uStepperServo::uStepperServo
uStepperServo()
Constructor for servo class.
Definition: uStepperServo.cpp:105
uStepperServo::min16
uint8_t min16
Definition: uStepperServo.h:53
uStepperServo::pin
uint8_t pin
Definition: uStepperServo.h:47
uStepperServo::max16
uint8_t max16
Definition: uStepperServo.h:55
uStepperServo::angle
uint8_t angle
Definition: uStepperServo.h:49
uStepperServo::pulse
uint16_t pulse
Definition: uStepperServo.h:51