yutaro okamura / Mbed 2 deprecated jissyuutest

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
namazunlv100
Date:
Thu May 11 08:12:00 2017 +0000
Commit message:
testMock

Changed in this revision

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/main.cpp	Thu May 11 08:12:00 2017 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+                                        /*Fセンサ完成後*/
+AnalogIn   lisensa1(PTB0);
+AnalogIn   lisensa2(PTB2);
+AnalogIn   trsensa1(PTB1);
+AnalogIn   trsensa2(PTB3);               
+DigitalIn  ftrsensa1(PTE21);
+DigitalIn  ftrsensa2(PTE23);           /*Analogにする時pinを変える必要あり 右下PTC2   Digitalの時にはPTE23*/
+BusOut     moter1(PTA1,PTA2);           
+PwmOut     power1(PTD4);                    /*上限0.001,下限0.0005*/
+BusOut     moter2(PTC0,PTC7);
+PwmOut     power2(PTA12);
+BusOut     moter3(PTC6,PTC5);
+PwmOut     power3(PTA4);
+DigitalOut myled1(PTB8);
+DigitalOut myled2(PTB10);
+DigitalOut myled3(PTB9);
+DigitalOut myled4(PTB11);
+DigitalOut myled5(PTE2);
+
+int main() {
+    while(1) {
+        myled2 = 0;
+        myled5 = 0;
+        if(trsensa1 > 0.05){
+            myled2 = 1;
+        }    
+        if(trsensa2 > 0.03){
+            myled5 = 1;
+        }
+    }
+}  
+       
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 11 08:12:00 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9bcdf88f62b0
\ No newline at end of file