thread ve servo motor kullanimi

Dependencies:   mbed servo_motor mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
marvas
Date:
Tue Dec 17 12:55:58 2019 +0000
Commit message:
thread ve servo motor kullanimi

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib 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
servo_motor.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 3221160b3d1f main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 17 12:55:58 2019 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+#include "rtos.h"
+#include "servo.h"
+Thread servo_calismasi;
+DigitalOut led(PA_5);
+servo motor(PC_8);
+
+void motor_calismasi()
+{
+    while(1)
+    {
+        motor.derece(5);
+        wait(1);
+        motor.derece(90);
+         wait(1);
+        motor.derece(120);
+         wait(1);
+        motor.derece(150);
+              wait(1);
+        motor.derece(175);   
+        wait(1);    
+        }
+    }
+
+int main()
+{
+servo_calismasi.start(motor_calismasi);//thread başlatma ve fonkisyona yönlendirme
+    while(true) {
+led=!led;
+wait(1);
+
+    }
+    return 0;
+}
\ No newline at end of file
diff -r 000000000000 -r 3221160b3d1f mbed-rtos.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Tue Dec 17 12:55:58 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed-rtos/#5713cbbdb706
diff -r 000000000000 -r 3221160b3d1f mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Dec 17 12:55:58 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file
diff -r 000000000000 -r 3221160b3d1f servo_motor.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/servo_motor.lib	Tue Dec 17 12:55:58 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/marvas/code/servo_motor/#a693d4a007d6