浏览代码

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();
     motor = new MotorAansturing();
     botsingdetectie = new Botsingdetectie();
     botsingdetectie = new Botsingdetectie();
     fysiekeindicator = new FysiekeIndicator();
     fysiekeindicator = new FysiekeIndicator();
-    motor.setSnelheid(100);
+    motor.setSnelheid(50);
     motor.setRichting(true);
     motor.setRichting(true);
     motor.start();
     motor.start();
 
 

+ 2 - 0
Botsingdetectie.java

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

+ 1 - 2
Main.java

@@ -6,7 +6,6 @@ package boebot;
 import stamp.core.*;
 import stamp.core.*;
 public class Main{
 public class Main{
   public static void 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(){
  public void start(){
-    int maxSnelheid = snelheidL;
-    System.out.println(maxSnelheid);
+    int maxSnelheid = snelheidL;   
     for (int i=0; i<=maxSnelheid; i = i + 10)  {
     for (int i=0; i<=maxSnelheid; i = i + 10)  {
              setSnelheid(i);
              setSnelheid(i);
              rijden();
              rijden();