Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:2525c146f45f, committed 2019-12-20
- Comitter:
- kykim9050
- Date:
- Fri Dec 20 07:32:04 2019 +0000
- Commit message:
- first commit
Changed in this revision
--- /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