const int DIR = 12;
const int STEP = 13;
const int rev = 200;
void setup() {
Serial.begin(9600);
pinMode(25,OUTPUT);
pinMode(26, INPUT);
pinMode(DIR, OUTPUT);
pinMode(STEP, OUTPUT);
}
void loop() {
digitalWrite(DIR, HIGH);
for(int i =0;i<rev;i++)
{
digitalWrite(STEP, HIGH);
delay(500);
digitalWrite(STEP,LOW);
delay(500);
}
delay(1000);
digitalWrite(DIR, LOW);
for(int i=0;i<rev;i++)
{
digitalWrite(STEP, HIGH);
delay(1000);
digitalWrite(STEP, LOW);
delay(1000);
}
delay(1000);
// int zenzorvalue = analogRead(26);
//Serial.println(zenzorvalue);
//analogWrite(25, zenzorvalue);
//delay(100);
}