'step' was not declared in this scope

bonsoir, je suis nouveau ainsi que débutant en programmation et je suis entrain de construire mon premier code sur arduino
ce code me permet de détecter la frequence (tr/mn) d'un arbre a travers un encodeur ensuite commander le moteur pas a pas suivant les fréquences lus(l'arbre tourne en continu)
j'ai l'erreur suivant "'step' was not declared in this scope"
et d'autre part je veux si mon code vérifie mes besoins et merci

#include <Stepper.h>
#define STEPS 48

double val=0;
byte PinA=2;
byte PinB=3;
int ASet;
int BSet;

Stepper myStepper(STEPS,8,9,10,11);
void setup()
{
Serial.begin(9600);
pinMode(PinA, INPUT);
pinMode(PinB, INPUT);

ASet = digitalRead(PinA);
BSet = digitalRead(PinB); // read the input pin

attachInterrupt(0, INCRE, CHANGE);
attachInterrupt(1, DECRE, CHANGE);
}

void loop()
{
myStepper . setSpeed(200);
int time=millis()/1000;
if(time % 10==0)
{
Serial.print(time);
Serial.print(" \t ");
Serial.print(val6/200);
Serial.println(" rpm");
{
if ((val
6/200) > 240 and (val6/200) < 260)
Serial.print("1") ;
else if ((val
6/200) > 490 and (val6/200) < 510);
step.myStepper(5)
else if ((val
6/200) > 740 and (val6/200) < 760);
step.myStepper(8);
else if ((val
6/200) > 1090 and (val*6/200) < 1110);
step.myStepper(10);
}

val=0;
delay(1000);

}

}

void INCRE()
{
ASet = digitalRead(PinA) == HIGH;
val += (ASet != BSet) ? +1 : -1;
}

void DECRE()
{
BSet = digitalRead(PinB) == HIGH;
val += (ASet == BSet) ? +1 : -1;
}

sketch_may15a.ino (1.14 KB)

Changement:

      else if ((val*6/200) > 490 and (val*6/200) < 510);
      step.myStepper(5)
        else if  ((val*6/200) > 740 and (val*6/200) < 760);
        step.myStepper(8);
        else if ((val*6/200) > 1090 and (val*6/200) < 1110);
        step.myStepper(10);

EDIT: essai

#include <Stepper.h>
#define STEPS  48

double val = 0;
byte  PinA = 2;
byte PinB = 3;
int ASet;
int BSet;

void INCRE();     // Function prototypes
void DECRE();

Stepper myStepper(STEPS, 8, 9, 10, 11);
void setup()
{
  Serial.begin(9600);
  pinMode(PinA, INPUT);
  pinMode(PinB, INPUT);


  ASet = digitalRead(PinA);
  BSet = digitalRead(PinB);   // read the input pin

  attachInterrupt(0, INCRE, CHANGE);
  attachInterrupt(1, DECRE, CHANGE);
}

void loop()
{
  myStepper . setSpeed(200);
  int time = millis() / 1000;
  if (time % 10 == 0)
  {
    Serial.print(time);
    Serial.print("  \t  ");
    Serial.print(val * 6 / 200);
    Serial.println(" rpm");

    if ((val * 6 / 200) > 240 && (val * 6 / 200) < 260)
      Serial.print("1") ;
    else if ((val * 6 / 200) > 490 && (val * 6 / 200) < 510)
      myStepper.step(5);
    else if  ((val * 6 / 200) > 740 && (val * 6 / 200) < 760)
    myStepper.step(8);
    else if ((val * 6 / 200) > 1090 && (val * 6 / 200) < 1110)
    myStepper.step(10);
  }

  val = 0;
  delay(1000);

}



void INCRE()
{
  ASet = digitalRead(PinA) == HIGH;
  val += (ASet != BSet) ? +1 : -1;
}

void DECRE()
{
  BSet = digitalRead(PinB) == HIGH;
  val += (ASet == BSet) ? +1 : -1;
}

Employ Ctr-T avant inscription