Lab_interaccio/2015/stepper/stepper.ino

24 lines
679 B
Arduino
Raw Permalink Normal View History

2025-02-25 21:29:42 +01:00
/********************************************************
** More info about the project at: **
** http://lusorobotica.com/index.php?topic=106.0 **
** by TigPT at [url=http://www.LusoRobotica.com]www.LusoRobotica.com[/url] **
*********************************************************/
int dirPin = 9;
int stepperPin = 8;
int speedM = 10000;
void setup() {
pinMode(dirPin, OUTPUT);
pinMode(stepperPin, OUTPUT);
digitalWrite(dirPin,true);
}
void loop(){
digitalWrite(stepperPin, HIGH);
delayMicroseconds(speedM);
// delay(speedM);
digitalWrite(stepperPin, LOW);
// delay(speedM);
delayMicroseconds(speedM);
}