2014-06-03 16:23:26 +00:00
|
|
|
/*
|
|
|
|
* Author: Yevgeniy Kiveisha <yevgeniy.kiveisha@intel.com>
|
|
|
|
* Copyright (c) 2014 Intel Corporation.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
* a copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
|
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "servo.h"
|
|
|
|
|
|
|
|
namespace upm {
|
|
|
|
|
2014-06-09 16:00:07 +00:00
|
|
|
/**
|
2015-04-14 17:34:47 -07:00
|
|
|
* @library servo
|
2015-04-14 11:17:11 -07:00
|
|
|
* @sensor es08a
|
|
|
|
* @comname es0a servo
|
|
|
|
* @type servos
|
|
|
|
* @man emax
|
|
|
|
* @web http://www.seeedstudio.com/wiki/Grove_-_Servo
|
|
|
|
* @con pwm
|
|
|
|
* @kit gsk
|
2014-06-09 16:00:07 +00:00
|
|
|
*
|
2015-04-14 11:17:11 -07:00
|
|
|
* @brief C++ API for ES08A servo component
|
|
|
|
*
|
2015-01-22 20:08:11 -08:00
|
|
|
* This file defines the ES08A C++ interface for ES08A servos.
|
|
|
|
* Like other servos, the ES08A servo has a shaft that can be controlled
|
|
|
|
* by setting the desired angle. There are also routines for setting
|
|
|
|
* and getting the minimum and maximum pulse width as well as the
|
|
|
|
* maximum period.
|
2014-06-09 16:00:07 +00:00
|
|
|
*
|
2015-04-14 11:17:11 -07:00
|
|
|
* @image html es0a.jpeg
|
2014-06-09 16:00:07 +00:00
|
|
|
* @snippet es08a.cxx Interesting
|
|
|
|
*/
|
2015-04-14 11:17:11 -07:00
|
|
|
class ES08A : public Servo {
|
2014-06-03 16:23:26 +00:00
|
|
|
public:
|
2014-06-09 16:00:07 +00:00
|
|
|
/**
|
2015-01-22 20:08:11 -08:00
|
|
|
* Instantiates an ES08A object
|
2014-06-09 16:00:07 +00:00
|
|
|
*
|
|
|
|
* @param pin servo pin number
|
|
|
|
*/
|
2014-06-03 16:23:26 +00:00
|
|
|
ES08A (int pin);
|
2014-06-09 16:00:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ES08A object destructor.
|
|
|
|
*/
|
2014-06-03 16:23:26 +00:00
|
|
|
~ES08A ();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|