hisyam fs / Mbed 2 deprecated Test_all

Dependencies:   mbed ADS1115 StepperMotor SRF05 TPA81new

Files at this revision

API Documentation at this revision

Comitter:
hisyamfs
Date:
Wed Feb 06 16:21:38 2019 +0000
Parent:
31:95396425b44b
Child:
36:85c0bf43f4a4
Commit message:
tpa aja

Changed in this revision

TPA81new.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
--- a/TPA81new.lib	Thu Jan 24 14:52:52 2019 +0000
+++ b/TPA81new.lib	Wed Feb 06 16:21:38 2019 +0000
@@ -1,1 +1,1 @@
-TPA81new#90ed652031fd
+https://os.mbed.com/users/hisyamfs/code/TPA81new/#90ed652031fd
--- a/main.cpp	Thu Jan 24 14:52:52 2019 +0000
+++ b/main.cpp	Wed Feb 06 16:21:38 2019 +0000
@@ -63,10 +63,6 @@
 
 int main()
 {
-    //tpax.changeaddress(0xDC,0xDE);
-    relay = 1;
-    while(sound.read()){}
-    pc.printf("Sound Detected\n");
     while(1) {
         pc.printf("%d", tpay.getTemp(0));
         int i;
@@ -82,67 +78,10 @@
             pc.printf("%d ",tpax.getTemp(i));
         }
         pc.printf("\n");
-
-        pc.printf("us 1: %.2f\tus 2:%.2f\n", srf1.read(), srf2.read());
         
-        uv.Read();
-        int read = uv.Flag;
-        if (read) pc.printf("FIRE DETECTED\n");
-        else pc.printf("NOT DETECTED\n");
-        wait(0.5); // 200 ms
-        relay = 0;
-        pc.printf("RELAY ON\n"); 
-        wait(1);
-        relay = 1;
-        pc.printf("RELAY OFF\n");
-        
-           
-        
-        pc.printf("Line = %.2f\n", 3300*line.read());    
-        
-        for (int i=0; i<200; i++)
-        {
-            s.step(1, 1, 1/WAIT_TIME);
-        }
-        
-        uint16_t raw_a1 = ira1.read_u16();
-        uint16_t raw_a2 = ira2.read_u16();
-        uint16_t raw_a3 = ira3.read_u16();
-        uint16_t raw_a4 = ira4.read_u16();
-        uint16_t raw_a5 = ira5.read_u16();
-        uint16_t raw_a6 = ira6.read_u16();
-        uint16_t raw_a7 = ira7.read_u16();
-        uint16_t raw_a8 = ira8.read_u16();
-        
-        uint16_t raw_b1 = irb1.read_u16();
-        uint16_t raw_b2 = irb2.read_u16();
-        uint16_t raw_b3 = irb3.read_u16();
-        uint16_t raw_b4 = irb4.read_u16();
-        
-        float dist_a1 = call_depan(raw_a1);
-        float dist_a2 = call_depan(raw_a2);
-        float dist_a3 = call_depan(raw_a3);
-        float dist_a4 = call_depan(raw_a4);
-        float dist_a5 = call_depan(raw_a5);
-        float dist_a6 = call_depan(raw_a6);
-        float dist_a7 = call_depan(raw_a7);
-        float dist_a8 = call_depan(raw_a8);
-        
-        float dist_b1 = call_depan(raw_b1);
-        float dist_b2 = call_depan(raw_b2);
-        float dist_b3 = call_depan(raw_b3);
-        float dist_b4 = call_depan(raw_b4);
-        
-        pc.printf("ir atas\n");
-        pc.printf("    %.2f %.2f\n", dist_a2, dist_a1);
-        pc.printf("%.2f          %.2f\n", dist_a3, dist_a7);
-        pc.printf("%.2f          %.2f\n", dist_a4, dist_a8);
-        pc.printf("    %.2f %.2f\n", dist_a6, dist_a5);
-        
-        pc.printf("ir bawah\n");
-        pc.printf("      %.2f\n", dist_b1);
-        pc.printf("%.2f            %.2f\n", dist_b2, dist_b3);
-        pc.printf("      %.2f\n", dist_b4);
-        wait(1);
+//        for (int i=0; i<200; i++)
+//        {
+//            s.step(1, 1, 1/WAIT_TIME);
+//        }
     }
 }