ServoProg

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Mahran
Date:
Thu Feb 18 10:58:50 2016 +0000
Parent:
1:c56c4fb5cb59
Commit message:
Nucleo_PWM

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Feb 10 10:18:22 2016 +0000
+++ b/main.cpp	Thu Feb 18 10:58:50 2016 +0000
@@ -63,6 +63,30 @@
 Pince_Glissement_Droit(50);
 Pince_Glissement_Gauche(0);
 }
+
+void Pince_Cylindre_Droit(int a)
+{//
+PWM5.period_ms(20); 
+PWM5.write(map (a,0,180,0.028f,0.12f));   
+}
+
+void Pince_Cylindre_Gauche(int a)
+{//
+PWM6.period_ms(20); 
+PWM6.write(map (a,0,180,0.028f,0.12f));   
+}
+
+void Pince_Cylindre_Haut()
+{
+Pince_Cylindre_Gauche(0); 
+Pince_Cylindre_Droit(0);   
+}
+void Pince_Cylindre_Bas()
+{
+Pince_Cylindre_Gauche(0); 
+Pince_Cylindre_Droit(0);    
+}
+
 int main() 
 {