can actuator

Dependencies:   MS9g_move_sin mbed-STM32F103C8T6 mbed

Files at this revision

API Documentation at this revision

Comitter:
RuslanUrya
Date:
Sat Jun 16 00:35:07 2018 +0000
Commit message:
can actuator;

Changed in this revision

MS9g_move_sin.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-STM32F103C8T6.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MS9g_move_sin.lib	Sat Jun 16 00:35:07 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/RuslanUrya/code/MS9g_move_sin/#9839ae432c26
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jun 16 00:35:07 2018 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+#include "stm32f103c8t6.h"
+#include "MS9g_move_sin.h"
+
+DigitalOut myled(PC_13);
+InterruptIn button_left (PA_0);
+InterruptIn button_right (PA_1);
+Servo_9g_CAN Servo(PA_11, PA_12);
+
+void left() {
+    Servo.sendPosition(4, 1);
+}
+void right() {
+    Servo.sendPosition(4, 2);
+}
+void neitral() {
+    Servo.sendPosition(4, 1.5);
+}
+
+int main() {
+    confSysClock();
+    button_left.fall(&left);
+    button_left.rise(&neitral);
+    button_right.fall(&right);
+    button_right.rise(&neitral);
+    while(1) {
+       myled != myled;
+       wait(0.5);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-STM32F103C8T6.lib	Sat Jun 16 00:35:07 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/hudakz/code/mbed-STM32F103C8T6/#727468adfd1d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jun 16 00:35:07 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file