uStepper
uStepperServo.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * File: uStepperServo.h *
3 * Version: 1.1.0 *
4 * date: December 10, 2016 *
5 * Author: Thomas Hørring Olsen *
6 * *
7 *********************************************************************************************
8 * (C) 2016 *
9 * *
10 * ON Development IVS *
11 * www.on-development.com *
12 * administration@on-development.com *
13 * *
14 * The code contained in this file is based on the Arduino Software Servo Library found at *
15 * http://playground.arduino.cc/ComponentLib/Servo *
16 * *
17 * The code in this file is provided without warranty of any kind - use at own risk! *
18 * neither ON Development IVS nor the author, can be held responsible for any damage *
19 * caused by the use of the code contained in this file ! *
20 * *
21 ********************************************************************************************/
32 #ifndef _USTEPPERSERVO_H
33 #define _USTEPPERSERVO_H
34 
35 #include <Arduino.h>
36 #include <inttypes.h>
37 
38 #define NO_ANGLE (0xff)
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
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:59
Prototype of class for ustepper servo.
Definition: uStepperServo.h:43
static void refresh()
Updates servo output pins.
uStepperServo()
Constructor for servo class.
uint16_t pulse
Definition: uStepperServo.h:51
void write(int angleArg)
Specify angle of servo motor.
void setMinimumPulse(uint16_t t)
Sets the minimum pulse.
static uStepperServo * first
Definition: uStepperServo.h:62