uStepper
uStepperServo.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * File: uStepper.cpp *
3 * Version: 1.3.0 *
4 * date: January 10th, 2018 *
5 * Author: Thomas Hørring Olsen *
6 * *
7 *********************************************************************************************
8 * (C) 2018 *
9 * *
10 * uStepper ApS *
11 * www.ustepper.com *
12 * administration@ustepper.com *
13 * *
14 * The code contained in this file is released under the following open source license: *
15 * *
16 * Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International *
17 * *
18 * The code in this file is provided without warranty of any kind - use at own risk! *
19 * neither uStepper ApS nor the author, can be held responsible for any damage *
20 * caused by the use of the code contained in this file ! *
21 * *
22 ********************************************************************************************/
33 #ifndef _USTEPPERSERVO_H
34 #define _USTEPPERSERVO_H
35 
36 #include <Arduino.h>
37 #include <inttypes.h>
38 
39 #define NO_ANGLE (0xff)
40 
45 {
46  private:
48  uint8_t pin;
50  uint8_t angle;
52  uint16_t pulse;
54  uint8_t min16;
56  uint8_t max16;
57 
61 
63  static uStepperServo* first;
64  public:
65 
73  uStepperServo();
74 
86  uint8_t attach(int pinArg);
87 
93  void detach();
94 
102  void write(int angleArg);
103 
112  void setMinimumPulse(uint16_t t);
113 
122  void setMaximumPulse(uint16_t t);
123 
131  static void refresh();
132 };
133 
134 #endif
void detach()
Detaches the servo motor from the uStepper.
void setMaximumPulse(uint16_t t)
Sets the maximum pulse.
uint8_t attach(int pinArg)
Attaches the servo motor to a specific pin.
class uStepperServo * next
Definition: uStepperServo.h:60
Prototype of class for ustepper servo.
Definition: uStepperServo.h:44
static void refresh()
Updates servo output pins.
uStepperServo()
Constructor for servo class.
uint16_t pulse
Definition: uStepperServo.h:52
void write(int angleArg)
Specify angle of servo motor.
void setMinimumPulse(uint16_t t)
Sets the minimum pulse.
static uStepperServo * first
Definition: uStepperServo.h:63