aboutsummaryrefslogtreecommitdiff
path: root/Arduino2024
diff options
context:
space:
mode:
authorSjory <Mgj32000@gmail.com>2025-02-15 15:40:20 +0100
committerSjory <Mgj32000@gmail.com>2025-02-15 15:40:20 +0100
commit121e82171d2a36ea584c4d6700d9595efcb6df94 (patch)
tree498b378d37785b23756e8d39aea247bcf6db0ad7 /Arduino2024
parentfe57c288077ec03d78fdf4445b8fdcb2b984f17a (diff)
trying to publish
Diffstat (limited to 'Arduino2024')
-rw-r--r--Arduino2024/NewMotor/NewMotor.ino6
1 files changed, 6 insertions, 0 deletions
diff --git a/Arduino2024/NewMotor/NewMotor.ino b/Arduino2024/NewMotor/NewMotor.ino
index 48745fa..4c53fdb 100644
--- a/Arduino2024/NewMotor/NewMotor.ino
+++ b/Arduino2024/NewMotor/NewMotor.ino
@@ -27,6 +27,8 @@ void setup()
Serial.begin(115200);
Serial.println("ESP32 is ready");
+ pinMode(13, OUTPUT);
+
stepper.attach( stepPin, dirPin );
stepper.setSpeedSteps(20000); // = 75 steps/second (steps in 10 seconds)
stepper.setRampLen(500);
@@ -36,6 +38,7 @@ void setup()
void loop()
{
if (Serial.available()>0){
+ digitalWrite(13, HIGH);
String command = Serial.readStringUntil('/n'); //read communication until next line
command.trim();//removes any spaces before and after
@@ -62,6 +65,9 @@ void loop()
}
}
}
+ digitalWrite(13, HIGH);
+ delay(1000);
+ digitalWrite(13, LOW);
}