acil destek

      #include <Servo.h>

      #include <L298N.h>

      Servo microservo;

      float metal;

      int reading;

      int metalPin =A4;

      int pos=0;

      int IR=A0;

      int IRR;

      const int ENA = 6;

      const int IN1 = 8;

      const int IN2 = 7;

      const int IN3 = 2;

      const int IN4 = 4;

      const int ENB = 3;

      L298N driver(ENA,IN1,IN2,IN3,IN4,ENB);

      int time_delay = 2000;

      int speed = 250;

     

      void setup()

   {

      pinMode(IR, INPUT); // Signal

      pinMode(pos,  OUTPUT);

      microservo.attach(9);

      Serial.begin(9600);

      }

     

      void loop()

      {

      {

     

      reading = analogRead(metalPin);

      IRR = analogRead(IR);

      metal = (float)reading*100/1024.0;

      Serial.print("Metal sensor degeri = ");

      Serial.println(metal);

      Serial.println(IRR);

      if (metal >90 && IRR<500 )

    

                     for(pos = 0; pos < 90; pos += 3)  // 0 konumundan 90 dereceye gider

                     delay(90);

                      {                                                  //

                        microservo.write(pos);              // servo ‘pos’ değerine gitsin

                                                                          // her pozisyonda 20ms gecikme var

                      }

                      delay(100);

      if (metal<50 || IRR>550)

     

                     for(pos = 180; pos>=1; pos-=3)     // tam tersi 90 dereceden 0 dereceye

                      {                               

                      microservo.write(pos);              // servo pos değerine gitsin

                                                                        // her pozisyonda 1ms bekleme var

                      }

                      delay(10);

                     }           

                    {

                     driver.backward(speed,time_delay); //konveyörün hareket yönü sürekli

                     }

                     }

>>>>burada    L298N driver(ENA,IN1,IN2,IN3,IN4,ENB); ve driver.backward(speed,time_delay); //konveyörün hareket yönü sürekli satırlarında hata mevcut. çok acil düzeltir misiniz. yardım lütfen:( 

Hi @mhm27,

Thanks for participating!

We take our Code of Conduct very seriously and want to help ensure that everyone has a good experience free of antagonism and harassment. Unfortunately, we don’t currently have moderators for languages other than English. What this means is that, until that changes, we need to ask that everyone use English here in the GitHub Community Forum when posting. We’ll be locking any posts in languages other than English for now, including this one.

Thanks for meeting us halfway :grinning: