servo motor

Dependencies:   mbed QEI Servo HIDScope MODSERIAL FXOS8700Q FastPWM

Files at this revision

API Documentation at this revision

Comitter:
IsaRobin
Date:
Tue Oct 29 13:36:02 2019 +0000
Commit message:
ServoMotor

Changed in this revision

FXOS8700Q.lib Show annotated file Show diff for this revision Revisions of this file
FastPWM.lib Show annotated file Show diff for this revision Revisions of this file
HIDScope.lib Show annotated file Show diff for this revision Revisions of this file
MODSERIAL.lib Show annotated file Show diff for this revision Revisions of this file
QEI.lib Show annotated file Show diff for this revision Revisions of this file
Servo.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FXOS8700Q.lib	Tue Oct 29 13:36:02 2019 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/Freescale/code/FXOS8700Q/#aee7dea904e2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FastPWM.lib	Tue Oct 29 13:36:02 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Sissors/code/FastPWM/#c0b2265cff9c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HIDScope.lib	Tue Oct 29 13:36:02 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/tomlankhorst/code/HIDScope/#d23c6edecc49
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MODSERIAL.lib	Tue Oct 29 13:36:02 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Sissors/code/MODSERIAL/#d2a5e26fd658
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QEI.lib	Tue Oct 29 13:36:02 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/aberk/code/QEI/#5c2ad81551aa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Servo.lib	Tue Oct 29 13:36:02 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/jdenkers/code/Servo/#352133517ccc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 29 13:36:02 2019 +0000
@@ -0,0 +1,29 @@
+#include "Servo.h"
+#include "mbed.h"
+#include "MODSERIAL.h"
+#include "FastPWM.h"
+
+// PC connection
+MODSERIAL pc(USBTX, USBRX);
+
+int main()
+{
+pc.baud(115200);
+pc.printf("starting 1");
+Servo myservo(D3);
+int pos1 = 1000;
+int posperiod = 20000;
+myservo.Enable(pos1,posperiod);
+
+while(true) {
+    pc.printf("starting");
+    for (int pos = 1000; pos < 2000; pos += 25) {
+        myservo.SetPosition(pos);  
+        wait_ms(20);
+    }
+    for (int pos = 2000; pos > 1000; pos -= 25) {
+        myservo.SetPosition(pos); 
+        wait_ms(20); 
+        }
+    }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 29 13:36:02 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file