script voor project

Dependencies:   mbed QEI Servo HIDScope biquadFilter MODSERIAL FastPWM

Files at this revision

API Documentation at this revision

Comitter:
Rosalie
Date:
Fri Oct 11 06:55:29 2019 +0000
Parent:
4:6742476fadcf
Commit message:
project delen

Changed in this revision

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Servo.lib	Fri Oct 11 06:55:29 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/backman/code/Servo/#b9fe7af92cd5
--- a/main.cpp	Mon Oct 07 09:31:51 2019 +0000
+++ b/main.cpp	Fri Oct 11 06:55:29 2019 +0000
@@ -5,10 +5,13 @@
 #include "BiQuad.h"
 #include "FastPWM.h"
 #include <math.h>
+#include "Servo.h"
 
 //definieer objecten
 Serial pc(USBTX, USBRX);
 
+//Servo myservo(D8);
+
 Ticker myControllerTicker1;
 Ticker myControllerTicker2;
 
@@ -21,6 +24,7 @@
 DigitalOut motor1_dir(D7);
 DigitalOut motor2_dir(D4);
 
+
 InterruptIn button1(D1);
 InterruptIn button2(D2);
 
@@ -68,6 +72,11 @@
 
 int main()
     {
+      //  for(float p=0; p<1.0; p += 0.1)
+        //    {
+        //        myservo == p;
+         //       wait(0.2);
+         //   }
         myControllerTicker1.attach(motor1Controller, 0.1 ); // Every 1/10 second
         myControllerTicker2.attach(motor2Controller, 0.1 ); // Every 1/10 second