Page 450 - MDP2022-2
P. 450

spin(-1);

                          }else  if(mySerial.read()  ==  'd'){
                              spin(1);
                          }
                          */
                          //Serial.write("\n");

                      }
                  }


                  void  handle(){
                      Serial.write("THis  is  event  via  Timer  Handler");
                  }



                  void  servo(int  cycle)  {  //  pulse  width:  500  ~  2400  ...  sg90
                      for  (int  i  =  0;  i  <  100;  i++)  {
                          digitalWrite(PC9,HIGH);

                          delayMicroseconds(cycle);
                          digitalWrite(PC9,LOW);
                          delayMicroseconds(interval  -  cycle);
                      }
                  }





                  void  step_put_left(int  one,  int  two,  int  three,  int  four){
                      //
                      //Stepper  stepper_l(200,  pf13,  pe13,  pe15,  pe14);  left_b

                      //Stepper  stepper_r(200,  PE10,  PD11,  PD12,  PD13);  left_f
                      digitalWrite(PD4,one);
                      digitalWrite(PD6,two);
                      digitalWrite(PD5,three);
                      digitalWrite(PD7,four);
                      ///////

                      digitalWrite(PE10,one);
                      digitalWrite(PD11,two);
                      digitalWrite(PD12,three);
                      digitalWrite(PD13,four);

                  }
   445   446   447   448   449   450   451   452   453   454   455