Saturday, April 7, 2018

week 11

Title:   calibrate and troubleshooting 


Objective:  To calibrate and troubleshoot the prototype


Analysis/Discussion: for this week, I need to calibrate the prototype to make my project turn 180 degrees right or left, so I adjust the coding to make the prototype perfect turn. this because of the motor dc 60 rpm with no load, so that when the prototype has a load the motor not same rpm and because of that the prototype need time to get the best result. so i adjust the delay from my coding to make turn 180 degrees.

the coding :     else if (distance < 40 && i == 1)
  {
    digitalWrite(led, LOW); // LED 1(no obstacle) OFF 
    digitalWrite(led2, HIGH); // LED 2(obstacle) ON 
    //Make 180 turn to right 
//    digitalWrite(led3, HIGH);
//    digitalWrite(led4, LOW); //dummy utk turn left
    motorLeft();
    delay(6350); //delay kne buat bg ckup masa utk motor buat pusingan
    i = 0;
  }
  
  else if (distance < 40 && i == 0) 
  {
    digitalWrite(led, LOW); // LED 1(no obstacle) OFF 
    digitalWrite(led2, HIGH); // LED 2(obstacle) ON 
    //Make 180 turn to left 
//    digitalWrite(led3, LOW);
//    digitalWrite(led4, HIGH); //dummy utk turn left
    motorRight();
    delay(6350); //delay kne buat bg ckup masa utk motor buat pusingan
    i = 1;
  }


                         
the video above showed the calibration of the hardware.





Conclusion: as a conclusion, i have done the calibration and troubleshooting the prototype.

No comments:

Post a Comment