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.
Diff: PolyServo.h
- Revision:
- 0:6105cf98b610
- Child:
- 1:1135f0b1566e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PolyServo.h Fri Jun 26 08:23:05 2015 +0000
@@ -0,0 +1,45 @@
+#ifndef POLYSERVO_H
+#define POLYSERVO_H
+
+#include "mbed.h"
+#include <vector>
+
+
+#define SERVO_DISABLED -1 // This is going to take raw servo microsecond entries.
+#define SERVO_PPM_PERIOD 20000 // In microseconds
+
+class Polyservo {
+public:
+
+ std::vector<DigitalOut *> servos;
+ //DigitalOut * servos;
+
+ bool global_enable;
+ int position[];
+ int numservos;
+
+ Polyservo(DigitalOut servo_pins[], int num_pins);
+ void set_position(int pos);
+
+
+
+
+
+private:
+
+ Ticker period_tick;
+ std::vector<Timeout *> servo_times;
+ //Timeout * servo_times;
+
+
+
+
+
+
+
+
+};
+
+
+
+#endif
\ No newline at end of file