瀏覽代碼

Verbeterde rand detectie

jancoow 11 年之前
父節點
當前提交
865a98159e
共有 4 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      BoeBot.java
  2. 2 0
      Botsingdetectie.java
  3. 1 2
      Main.java
  4. 1 2
      MotorAansturing.java

+ 1 - 1
BoeBot.java

@@ -10,7 +10,7 @@ public class BoeBot{
     motor = new MotorAansturing();
     botsingdetectie = new Botsingdetectie();
     fysiekeindicator = new FysiekeIndicator();
-    motor.setSnelheid(100);
+    motor.setSnelheid(50);
     motor.setRichting(true);
     motor.start();
 

+ 2 - 0
Botsingdetectie.java

@@ -14,6 +14,8 @@ public class Botsingdetectie{
 
     IrDetectL = irL.detect();
     IrDetectR = irR.detect();
+    System.out.println(IrDetectL);
+    System.out.println(IrDetectR);
     if(IrDetectL || IrDetectR){
         return true;
 

+ 1 - 2
Main.java

@@ -6,7 +6,6 @@ package boebot;
 import stamp.core.*;
 public class Main{
   public static void main(){
-    MotorAansturing motor = new MotorAansturing();
+    BoeBot bot = new BoeBot();
   }
 }
-

+ 1 - 2
MotorAansturing.java

@@ -26,8 +26,7 @@ public class MotorAansturing{
  }
 
  public void start(){
-    int maxSnelheid = snelheidL;
-    System.out.println(maxSnelheid);
+    int maxSnelheid = snelheidL;   
     for (int i=0; i<=maxSnelheid; i = i + 10)  {
              setSnelheid(i);
              rijden();