/* Mini CNC Machine By : T4TECHZ http://www.youtube.com/c/T4TECHZOfficialChannel Follow the video of CNC Machine https://youtu.be/PtbnPl4-yyo */ #include <Servo.h> #include <Stepper.h> #define LINE_BUFFER_LENGTH 512 // Servo position for Up and Down const int penZUp = 110 ; const int penZDown = 90; // Servo on PWM pin 6 const int penServoPin = 6; // Should be right for DVD steppers, but is not too important here const int stepsPerRevolution = 20; // create servo object to control a servo Servo penServo; // Initialize steppers for X- and Y-axis using this Arduino pins for the L293D H-bridge Stepper myStepperY(stepsPerRevolution, 2,3,4,5); Stepper myStepperX(stepsPerRevolution, 8,9,10,11); /* Structures, global variables */ struct point { float x; float y; float z; }; // Current position of plothead struct point actuatorPos; //...