宮崎へ

Dependencies:   Servo mbed

Files at this revision

API Documentation at this revision

Comitter:
e5115026
Date:
Thu Dec 14 08:15:23 2017 +0000
Commit message:
???

Changed in this revision

Servo.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/Servo.lib	Thu Dec 14 08:15:23 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/Servo/#36b69a7ced07
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Dec 14 08:15:23 2017 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "Servo.h"
+
+DigitalOut myled(LED1);
+DigitalIn sw(p24);
+Servo myservo(p25);
+
+//グローバル変数
+
+//main関数
+int main() {
+    sw.mode(PullUp);
+    while(1) {
+        if(sw.read()==1){
+            myservo = 1;
+            }
+        else{
+            myservo = 0;
+            }
+        
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Dec 14 08:15:23 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/b484a57bc302
\ No newline at end of file