| 123456789101112131415161718192021222324252627282930 |
- package boebot;
- public class Botsingdetectie{
- private IrDetectie irL;
- private IrDetectie irR;
- private boolean IrDetectL;
- private boolean IrDetectR;
- public Botsingdetectie(){
- irL = new IrDetectie(8, 9);
- irR = new IrDetectie(2, 0);
- }
- public boolean detectEdge(){
- IrDetectL = irL.detect();
- IrDetectR = irR.detect();
- System.out.println(IrDetectL);
- System.out.println(IrDetectR);
- if(IrDetectL || IrDetectR){
- return true;
- }else{
- return false;
- }
- }
- }
|