REPALphilread / ReP_AL-3D-Lawn-Mower

Code and Other for the ReP_AL Lawn Mower
104 stars 53 forks source link

spirale mode #1

Closed shamanic50 closed 5 years ago

shamanic50 commented 5 years ago

Hi, I tried to create a spirale mode. I would to use this mode when in friend house without perimeter wire. The code in "specials"

" void Special_Cut_Under_Trampoline_Function() { //Enter Code Here lcd.clear(); lcd.print("Place Mower at"); lcd.setCursor(0,1); lcd.print("trampoline legs"); delay(5000); lcd.clear(); lcd.print("Press Start >"); int GO = 0; while (GO == 0) { Read_Membrane_Keys(); delay(100);
if(!Start_Key_X){ GO = 1;
} } // end of while loop

lcd.clear();
digitalWrite(Relay_Motors, LOW);
lcd.print("3....");
Motor_Action_Spin_Blades();
delay(1000);
lcd.clear();
lcd.print("2....");
delay(1000);
lcd.clear();
lcd.print("1....");
delay(1000);
lcd.clear();
lcd.print("GO!!!!!!");
delay(1000);

int tourtime=12000; // circle tourtime. it is about intersection areas between each spiral. it should be less than circle time int increasetime=3000; // time for next tour, larger spiral needs more time int numberofspiral=3000; // number of circle int minspeed=80; // initial speed for spiral. int maxspeed=255;// max speed

SetPins_ToGoForwards();
Motor_Action_Go_Full_Speed();
delay(100);
      PWM_MaxSpeed_RH = maxspeed;
for(int i=0;i<=numberofspiral;i++) {
   PWM_MaxSpeed_LH = minspeed;

Motor_Action_Go_Full_Speed(); minspeed=minspeed1.1;// increase the speed to increase radius delay(tourtime); tourtime=tourtime+(increasetime1.1); // increase the time for scan optimum area } delay(150); Motor_Action_Stop_Spin_Blades();
Motor_Action_Stop_Motors();

lcd.clear(); lcd.print("Finished"); delay(5000); lcd.clear(); }

"

REPALphilread commented 5 years ago

Thanks for the code. I tried to integrate the spiral feature into Code 6.6 onwards. Phil.