Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Nucleo_PWM by
Diff: main.cpp
- Revision:
- 2:05faa0892bec
- Parent:
- 1:c56c4fb5cb59
- Child:
- 3:3b6b718a76cd
--- 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()
{
