Servo script + magnet driver for biorobotics project in Uni. Made by Teun van der Molen

Dependencies:   MODSERIAL Servo mbed

Revision:
2:37d109555c95
Parent:
1:26baa438620b
diff -r 26baa438620b -r 37d109555c95 main.cpp
--- a/main.cpp	Mon Sep 28 14:27:06 2015 +0000
+++ b/main.cpp	Mon Oct 19 10:00:03 2015 +0000
@@ -1,5 +1,4 @@
 #include "mbed.h"
-
 #include "Servo.h"
  
 
@@ -11,11 +10,11 @@
 int main()
 {
   
-       Servo swagvo(D4);    //devine the port for controlling the servo (this cannot be a PWM port !!!)
+       Servo swagvo(D4);    //devine the port for controlling the servo (this cannot be a PWM port (i think) !!!)
        int down = 0;        //counter
        green = 1;       
        
-swagvo.Enable(2350,20000);      //turning on the servo (starting position,frequency (50 Hz do not change!!!))
+swagvo.Enable(1500,20000);      //turning on the servo (starting position,frequency (50 Hz do not change!!!))
                                 // The servo has the following positions (fully left: 650, center (1500), fully right (2350)) these values prevent the servo from grinding so do not exceed them
 
     while(true) {