Browse Source

Update BoeBot.java

De afstandbediening kan nu aangezet worden en uitgezet worden
worms618 11 năm trước cách đây
mục cha
commit
af2ca29c81
1 tập tin đã thay đổi với 15 bổ sung2 xóa
  1. 15 2
      BoeBot.java

+ 15 - 2
BoeBot.java

@@ -53,9 +53,22 @@ public class BoeBot{
            motor.setRichting(true);
            motor.start();
        }
-        CPU.delay(1000);
+        int getal = afir.detect(4);
+        if(getal == 21)
+        {
+        afir.setStatus(!afir.getStatus());
+        }
+        if(afir.getStatus())
+        {
+        if(getal != -1){
+        afir.verwerkSignaal(getal);
+        }
+        else
+        {
+          //some other code
+        }
 
     }
  }
 
-}
+}