Baby-Foot / Mbed 2 deprecated BABY-TEST_remis_en_jeu

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
gtarronge1
Date:
Tue Jan 19 10:46:46 2021 +0000
Commit message:
test;

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:46:46 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(750);
+    servo.pulsewidth_us(2200);
+    wait_ms(750);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 19 10:46:46 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file