tes ir atas semua

Dependencies:   mbed ADS1115 StepperMotor SRF05 TPA81new

Revision:
17:fd06e8104835
Parent:
16:771d84a80e3d
Child:
18:f3b23331090f
Child:
23:cacb4f75ddae
--- a/main.cpp	Mon Jan 21 12:17:55 2019 +0000
+++ b/main.cpp	Mon Jan 21 12:22:12 2019 +0000
@@ -8,12 +8,18 @@
 #define LCD_RS_DIG PB_7
 
 Serial pc(USBTX,USBRX);
+
+// TPA
 TPA81 tpax(PB_9, PB_8, 0xDC);
 TPA81 tpay(PB_3, PB_10, 0xDE);
 
+// Ultrasonik
 SRF05 srf1(PC_13, PA_14); // trigger, echo
 SRF05 srf2(PA_15, PB_7); // trigger, echo
 
+// UVTron
+Uvtron uv(PC_12); 
+
 int main()
 {
     //tpax.changeaddress(0xDC,0xDE);
@@ -34,6 +40,11 @@
         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