a

Dependents:   3servotest 1stcomp 3rdcompfixstart 2ndcomp ... more

Fork of Servo by Tk A

Files at this revision

API Documentation at this revision

Comitter:
choutin
Date:
Fri Sep 09 11:40:55 2016 +0000
Parent:
3:c112df463a8d
Child:
5:58ef29cb8785
Commit message:
a; ;

Changed in this revision

servo.cpp Show annotated file Show diff for this revision Revisions of this file
servo.h Show annotated file Show diff for this revision Revisions of this file
--- a/servo.cpp	Thu Sep 08 10:07:15 2016 +0000
+++ b/servo.cpp	Fri Sep 09 11:40:55 2016 +0000
@@ -43,12 +43,19 @@
 }
 
 
+void beltstop(void){
+
+   pwmarm.period_ms(20);        //20ms
+    pwmbelt.write(0.075); 
+       
+}
+
 void close_hand(void) {
      int i,degree;
 
     pwmhand.period_ms(20);        //20ms
     
-        degree=175;
+        degree=130;
 
         i=500+degree*1900/180;
         pwmhand.write(i/PERIOD); 
--- a/servo.h	Thu Sep 08 10:07:15 2016 +0000
+++ b/servo.h	Fri Sep 09 11:40:55 2016 +0000
@@ -14,4 +14,6 @@
 
 void beltup(void);
 
-void beltdown(void);
\ No newline at end of file
+void beltdown(void);
+
+void beltstop(void);
\ No newline at end of file