Sheco_dev / Mbed 2 deprecated Reading_RF_signal_FUTABA

Dependencies:   mbed Pulse1

Files at this revision

API Documentation at this revision

Comitter:
kykim9050
Date:
Fri Dec 20 07:32:04 2019 +0000
Commit message:
first commit

Changed in this revision

Pulse1.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.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Pulse1.lib	Fri Dec 20 07:32:04 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/tony63/code/Pulse1/#48651f86a80c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Dec 20 07:32:04 2019 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "Pulse1.h"
+
+//------------------------------------
+// Hyperterminal configuration
+// 115200 bauds, 8-bit data, no parity
+// pwm범위 : 920 ~ 2080, 중간값은 1500
+//------------------------------------
+
+Serial pc(SERIAL_TX, SERIAL_RX, 115200);
+
+PulseInOut valueOfLeftAndRight(A0); //채널1, futaba기준 좌우방향(오른쪽 조이스틱)
+PulseInOut valueOfFrontAndRear(A1); //채널2, futaba기준 상하방향(오른쪽 조이스틱)
+PulseInOut valueOfScrewSpeed(A2);   //채널3, futaba기준 상하방향, 회수스크류(왼쪽 조이스틱)
+
+int main()
+{
+    
+    while(1) {
+        pc.printf("-----------------------------------\n");
+        pc.printf("Left and Right PWM : pw = %d \n",valueOfLeftAndRight.read_high_us(30000));   //마이크로초 단위로 받아옴
+        pc.printf("Front and Rear PWM : pw = %d \n",valueOfFrontAndRear.read_high_us(30000));
+        pc.printf("Screw PWM : pw = %d \n",valueOfScrewSpeed.read_high_us(30000));
+
+
+        wait(0.5);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Dec 20 07:32:04 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file