Baby-Foot / Mbed 2 deprecated BABY-TEST_frappe

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
gtarronge1
Date:
Tue Jan 19 10:57:59 2021 +0000
Commit message:
Frappe du gardien

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jan 19 10:57:59 2021 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+
+PwmOut servo(p21);
+
+void servo_joueur();
+
+int main()
+{
+    servo.period_ms(20);
+ //   servo.pulsewidth_us(2325/2);
+    while(1)
+    {
+        servo_joueur();
+    }
+}
+
+void servo_joueur(void)
+{
+    servo.pulsewidth_us(1000);
+    wait_ms(500);
+    servo.pulsewidth_us(2000);
+    wait_ms(500);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 19 10:57:59 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file