[Q] about Gcode CNC Demo?

Shop Forum Everything Else [Q] about Gcode CNC Demo?

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6008
    Anonymous
    Inactive

    Hello All!

    I have question about “GcodeCNCDemo2AxisV1“!
    I have a “Arduino Mega 2560” with “Adafruit Motor Shield v1“, I uploaded
    GcodeCNCDemo2AxisV1 code on my arduino and use UniversalGcodeSender v1.0.5 for G-Code send to
    board, but not working any X or Y axis! ?
    I am grateful that can help me!

    Thank you

    #6704
    Anonymous
    Inactive

    Can you share a picture of your wiring, please?

    I have never tried the shield with the MEGA but it should be the same.

    #6705
    Anonymous
    Inactive

    @i-make-robots wrote:

    Can you share a picture of your wiring, please?

    I have never tried the shield with the MEGA but it should be the same.

    Hello
    I think the wires are connected correctly, because I try with some code tested and for example:

    #include 
    #include

    AF_Stepper motor1(200, 1);
    AF_Stepper motor2(200, 2);

    void forwardstep1() {
    motor1.onestep(FORWARD, SINGLE);
    }
    void backwardstep1() {
    motor1.onestep(BACKWARD, SINGLE);
    }
    void forwardstep2() {
    motor2.onestep(FORWARD, SINGLE);
    }
    void backwardstep2() {
    motor2.onestep(BACKWARD, SINGLE);
    }

    AccelStepper stepper1(forwardstep1, backwardstep1);
    AccelStepper stepper2(forwardstep2, backwardstep2);

    void setup()
    {
    stepper1.setMaxSpeed(200.0);
    stepper1.setAcceleration(100.0);
    stepper1.moveTo(24);

    stepper2.setMaxSpeed(300.0);
    stepper2.setAcceleration(100.0);
    stepper2.moveTo(50);

    }

    void loop()
    {
    if (stepper1.distanceToGo() == 0)
    stepper1.moveTo(-stepper1.currentPosition());
    stepper1.run();
    stepper2.run();
    }

    and is very good any axis work!
    and what can i do now?!

    #6706
    Anonymous
    Inactive

    When you send commands from inside arduino serial window,

    do you send line feeds?

    do you include ; at the end of commands?

    #6707
    Anonymous
    Inactive

    @i-make-robots wrote:

    When you send commands from inside arduino serial window,

    do you send line feeds?

    do you include ; at the end of commands?

    Yes, very good point! WORKING!
    Before i try with another g-code sender tested and now i testing in serial monitor for Arduino software and working.
    I have another question, how I can send serial g-code direct to board?
    For example, I have export g-code file xxxxx.nc or another g-code files format, how can I run this file on my board?
    With which g-code software sender?

    Thank you

    #6708
    Anonymous
    Inactive

    Gcodesender should work.

    #6709
    Anonymous
    Inactive

    @nahci13 wrote:

    Yes, very good point! WORKING!
    Before i try with another g-code sender tested and now i testing in serial monitor for Arduino software and working.
    I have another question, how I can send serial g-code direct to board?
    For example, I have export g-code file xxxxx.nc or another g-code files format, how can I run this file on my board?
    With which g-code software sender?

    Thank you

    I use serial monitor on Arduino Software connect ok, can see Help Menu. Try input command “G0 X5 Y5;” but motor not run. Try command “G92 X5 Y5;” and then “M114;”, value of 2 axis X Y change to 5 but no motor run.

    #6710
    Anonymous
    Inactive

    try without “;”. also make sure serial windows option “send line ending” is on.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.