From 121e82171d2a36ea584c4d6700d9595efcb6df94 Mon Sep 17 00:00:00 2001 From: Sjory Date: Sat, 15 Feb 2025 15:40:20 +0100 Subject: trying to publish --- Arduino2024/NewMotor/NewMotor.ino | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Arduino2024') 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); } -- cgit v1.3.1