Просмотр исходного кода

added esp32 TMC2209, fix pattern issue

Tuan Nguyen 1 год назад
Родитель
Сommit
85966bd65b
4 измененных файлов с 6 добавлено и 9 удалено
  1. 2 1
      app.py
  2. 3 5
      firmware/esp32_TMC2209/esp32_TMC2209.ino
  3. 0 3
      patterns/SwoopyRadiance.thr
  4. 1 0
      templates/index.html

+ 2 - 1
app.py

@@ -50,7 +50,8 @@ PLAYLISTS_FILE = os.path.join(os.getcwd(), "playlists.json")
 MOTOR_TYPE_MAPPING = {
     "TMC2209": "./firmware/arduino_code_TMC2209/arduino_code_TMC2209.ino",
     "DRV8825": "./firmware/arduino_code/arduino_code.ino",
-    "esp32": "./firmware/esp32/esp32.ino"
+    "esp32": "./firmware/esp32/esp32.ino",
+    "esp32_TMC2209": "./firmware/esp32_TMC2209/esp32_TMC2209.ino"
 }
 
 # Ensure the file exists and contains at least an empty JSON object

+ 3 - 5
file.ino → firmware/esp32_TMC2209/esp32_TMC2209.ino

@@ -17,8 +17,6 @@
 
 #define BUFFER_SIZE 10 // Maximum number of theta-rho pairs in a batch
 
-#define MODE_APP 0
-
 // Create stepper motor objects
 AccelStepper rotStepper(rotInterfaceType, stepPin_rot, dirPin_rot);
 AccelStepper inOutStepper(inOutInterfaceType, stepPin_InOut, dirPin_InOut);
@@ -41,9 +39,6 @@ float maxAcceleration = 1000;
 long interpolationResolution = 1;
 float userDefinedSpeed = maxSpeed; // Store user-defined speed
 
-// Running Mode
-int currentMode = MODE_APP; // Default mode is app mode.
-
 void setup()
 {
     // Set maximum speed and acceleration
@@ -59,6 +54,9 @@ void setup()
 
     // Initialize serial communication
     Serial.begin(115200);
+    Serial.println("Table: Dune Weaver");
+    Serial.println("Drivers: ESP32-TMC2209");
+    Serial.println("Version: 1.4.0");
     Serial.println("R");
     homing();
 }

+ 0 - 3
patterns/SwoopyRadiance.thr

@@ -1,6 +1,3 @@
-0 0
-0 0
-0 1
 -565.48667765 0.1
 -565.4475053 0.3020095
 -565.38295591 0.48462502

+ 1 - 0
templates/index.html

@@ -361,6 +361,7 @@
                             <option value="TMC2209">Arduino TMC2209</option>
                             <option value="DRV8825">Arduino DRV8825</option>
                             <option value="esp32">ESP32</option>
+                            <option value="esp32_TMC2209">ESP32 TMC2209</option>
                         </select>
                         <button id="set_motor_type_button" onclick="setMotorType()">Set Motor Type</button>
                     </div>