Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Tach
ContinuousServo.h
00001 00002 /* Parallax High Speed Continuous Servo 00003 John Donnal 2018 00004 */ 00005 00006 #ifndef CONTINUOUS_SERVO_H 00007 #define CONTINUOUS_SERVO_H 00008 00009 /** 00010 * Includes 00011 */ 00012 #include "mbed.h" 00013 00014 /** 00015 * Parallax High Speed Continuous Servo Interface. 00016 */ 00017 class ContinuousServo { 00018 00019 public: 00020 00021 /** 00022 * Constructor. 00023 * 00024 * Drive Parallax servo (ActivityBot) 00025 * -1: full speed reverse 00026 * 0: stop 00027 * 1: full speed forward 00028 * @param output mbed pin for output channel. 00029 */ 00030 ContinuousServo(PinName output); 00031 00032 void speed(float val); 00033 void stop(void); 00034 private: 00035 00036 PwmOut servo_; 00037 }; 00038 00039 #endif /* CONTINUOUS_SERVO_H */
Generated on Sun Jul 17 2022 23:03:49 by
1.7.2