Configuring CNC shield V3 for use with Dragonframe animation software

I’m getting this error:

^
exit status 1
‘enablePin’ was not declared in this scope

(i’m trying to attach a screenshot)

Uncomment the line that declares the enable pin.

const byte enablePin = 8;

Wow, everything is working.

I get a low memory warning on upload.
Should i be concerned?

I tested a short on the E-Stop pins and that even works.
says axis is out of range.
shorting the End Stops did nothing.

There is the 'enable kill switch' option in the sketch.
is that different than the E-Stop?

Thanks again.

I got the low memory warning when I uploaded to an Uno, but everything seemed to work OK so I doubt that the low memory will be any problem. But I only tested with the serial monitor sending commands cause I don't have the software so YMMV. I think that the Estop and kill switches are the same thing.

Glad that I could help.

Just want to say thanks to all of you, especially groundFungus!!!!

Thanks

M

I can confirm that this worked for me.
Thanks for the problem solving everyone.

Cheers!
John Ikuma
(Stop Motion Magazine)

Hi,

I have a

Arduino uno
Cnc shield v3.0 from robotic thinking
Stepper motor 0404s from quimat

I try to change the code but something is wrong, im new in arduino.

¿Somebody can send me the modified code?

thaks

I try to change the code but something is wrong

I would try to help if I knew what "something is wrong" means. What code did you change? Why did you change the code? What were the changes? What is supposed to happen with the changed code? What does happen?

Hello,

I need to modify DFmoco for channel 4 (motor3).
Originally it was set like this:

channel 4
PIN 10 step
PIN 11 direction

I need to change it to:

channel 4
PIN 48 step
PIN 50 direction

So, i modify the sketch with this:

motors[0].stepPin = 4;
motors[0].dirPin = 5;
motors[1].stepPin = 6;
motors[1].dirPin = 7;
motors[2].stepPin = 8;
motors[2].dirPin = 9;
motors[3].stepPin = 48; // modify change
motors[3].dirPin = 50; // modify change
motors[4].stepPin = 28;
motors[4].dirPin = 29;
motors[5].stepPin = 30;
motors[5].dirPin = 31;
motors[5].stepPin = 32;
motors[5].dirPin = 33;
motors[5].stepPin = 34;
motors[5].dirPin = 35;

Which is work for dir PIN on 50.

But i totally not a clue with this part. (cant wrap my head on port register addresses).
original:

#define MOTOR3_STEP_PORT PORTB
#define MOTOR3_STEP_PIN B00010000

try this (and not working)

#define MOTOR3_STEP_PORT PORTL
#define MOTOR3_STEP_PIN B01000000

can please help? felt like almost there...

hey all ! I’m having trouble getting this to work… I’ve tried the combinations of script across posts 10, 33 and 37 but so far only controlling motor one on axis 3 in DF… do you think you could post the complete script? I saw you were worried about copyright but I can absolutely 100% guarantee you its fine to post… I actually know Dyami Caliri, the author of dragon frame and his brother Jamie… They are cool AF and the fact they even hand out the DF moco sketch with their awesome software is precisely because they’re all about open source … Recently I asked Jamie for the schematics to his arc moco octodrive because its discontinued (actually he’s just sold the last Volo to a studio I work at in London and closed down Arc moco for good!) and he sent me the entire design document with literally every component, receipts to show me where he bought all the parts, graphics for screen printing the case… the works… believe me when I say you can share the code! (I actually shoot stop Frame and was an early adopter of DF back when It was dragon stop motion… over the years the feedback we’ve given them has resulted in quite a few extra features… Dyami is actually working on one of my suggestions as we speak, namely the addition of lighting profile menu that lets you add fixtures into the DMX window with blocks of channels colour coded with each channels function already names on each channel!) If you get any heat for posting the script ill gift you my house to pay your legal bills! ;-p… sincerely Max Halstead… Stop motionographer (look me up if u think I’m bullshitting you) X

scratch that! got 3 motors working (was being a dozy ass - the motors I'm using have 5 holes and had them plugged in so only 3 pins were connected!) struggling to get the fourth Motor to work though.... did I read somewhere you need to short two pins somewhere on the shield? any advice would be much appreciated! Max

First off, thank all of you that have been working on this - there's certainly isn't much around in terms of documentation on how to set this all up. I've been through this entire thread and with the exception of the salesarea link from early on in the thread being dead am assuming I have everything right. I actually downloaded the sketch from post #10 and made the amendments as noted in post #37, overwriting the sketch that was supplied with DragonFrame (I kept a backup).

I'm getting a compile error that I can't find any reference to so assume I must be having a unique issue? I'm using an Arduino Uno with CNC shield 3.0 and 8825 Stepper Drivers. Other than the board selection I've made in Arduino though I don't think this is hardware related...I'm just trying to verify the sketch and getting the error below. I'm hoping someone might have some idea what might be wrong here. I know enough to be dangerous but not enough to troubleshoot specifics like this.

/var/folders/2d/0b58mqnx2ybfqvbnj50b57yr0000gn/T/arduino_modified_sketch_626896/DFMoco.pde: In function 'void setup()':
DFMoco:573:31: error: 'setPulsesPerSecond' was not declared in this scope
setPulsesPerSecond(i, 5000);
^
DFMoco:647:20: error: 'sendMessage' was not declared in this scope
sendMessage(MSG_HI, 0);
^
/var/folders/2d/0b58mqnx2ybfqvbnj50b57yr0000gn/T/arduino_modified_sketch_626896/DFMoco.pde: In function 'void loop()':
DFMoco:873:29: error: 'updateMotorVelocities' was not declared in this scope
updateMotorVelocities();
^
DFMoco:875:26: error: 'processSerialCommand' was not declared in this scope
processSerialCommand();
^
DFMoco:887:23: error: 'nextMessage' was not declared in this scope
nextMessage();
^
DFMoco:901:28: error: 'sendMessage' was not declared in this scope
sendMessage(MSG_MP, i);
^
/var/folders/2d/0b58mqnx2ybfqvbnj50b57yr0000gn/T/arduino_modified_sketch_626896/DFMoco.pde: In function 'void updateMotorVelocities()':
DFMoco:922:14: error: 'hardStop' was not declared in this scope
hardStop();
^
/var/folders/2d/0b58mqnx2ybfqvbnj50b57yr0000gn/T/arduino_modified_sketch_626896/DFMoco.pde: In function 'void setupMotorMove(int, int32_t)':
DFMoco:1005:50: error: 'calculatePointToPoint' was not declared in this scope
calculatePointToPoint(motorIndex, destination);
^
/var/folders/2d/0b58mqnx2ybfqvbnj50b57yr0000gn/T/arduino_modified_sketch_626896/DFMoco.pde: In function 'void hardStop()':
DFMoco:1017:16: error: 'stopMotor' was not declared in this scope
stopMotor(i);
^
/var/folders/2d/0b58mqnx2ybfqvbnj50b57yr0000gn/T/arduino_modified_sketch_626896/DFMoco.pde: In function 'void processGoPosition(int, int32_t)':
DFMoco:1078:31: error: 'sendMessage' was not declared in this scope
sendMessage(MSG_MM, motorIndex);
^
DFMoco:1082:31: error: 'sendMessage' was not declared in this scope
sendMessage(MSG_MP, motorIndex);
^
/var/folders/2d/0b58mqnx2ybfqvbnj50b57yr0000gn/T/arduino_modified_sketch_626896/DFMoco.pde: In function 'void processSerialCommand()':
DFMoco:1306:28: error: 'sendMessage' was not declared in this scope
sendMessage(MSG_HI, 0);
^
DFMoco:1404:142: error: 'setupBlur' was not declared in this scope
setupBlur(motor, userCmd.args[0], userCmd.args[1], userCmd.args[offset + 1], userCmd.args[offset + 2], userCmd.args[offset + 3]);
^
DFMoco:1445:62: error: 'jogMotor' was not declared in this scope
if (jogMotor(motor, userCmd.args[1], &destination))
^
DFMoco:1460:45: error: 'inchMotor' was not declared in this scope
inchMotor(motor, userCmd.args[1]);
^
/var/folders/2d/0b58mqnx2ybfqvbnj50b57yr0000gn/T/arduino_modified_sketch_626896/DFMoco.pde: In function 'void sendMessage(byte, byte)':
DFMoco:1497:19: error: 'nextMessage' was not declared in this scope
nextMessage();
^
exit status 1
'setPulsesPerSecond' was not declared in this scope

As a follow up. I had been working all along with the .pde file from DragonFrame direct as well as with the file from post #10 and was getting the error above. At some point I realized I hadn't installed my upgrade to DF v4 and in doing so noticed the new DFMoco file provided by DF includes an INO file. I believe the contents are still the same but didn't compare line for line.

In any case, I tried the INO file without any edits and it verified. I then made the edits as noted here and it all compiled and flashed without error. I now have four steppers running and controlled by DF4.

My setup is Arduino Uno/CNC Shield v3.0/8825 stepper drivers and long runner NEMA 17's.

Here is the modified INO file if anyone is having troubles and wants to try this one.

thank all of you that have been working on this. I have try the modified file from Macboy but can drive only one stepper!
thanks for help

hello friend, can you help me with this I know this conversation is old but I want to know if you still answer

@shanty13

You have not supplied enough information for anyone to really assist you.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

hello everyone and thanks for reading and your help, I am trying to configure my arduino with a cnc and work it through dragon frame and it does not work for me I see here that there are some changes to be made to the pin but in reality I do not know anything of this, if any of you could put a photo pointing out where it is that there is to make the change many thanks

pksproducciones, have you read the entire thread? In it are all of the pin changes and additions that were necessary and those worked for several others.

Did you set up the enable pin? danielroberthope discovered that the original code did not enable the steppers in the code (see reply #26). The enable pins are, it seems, hard wired LOW in the original author's circuit.

Add the parts like in reply #33 and also add:

const byte enablePin = 8;

right before setup() (make a global variable to hold the enable pin number).

and in setup():

pinMode(enablePin, OUTPUT);
digitalWrite(enablePin, LOW);

That will enable the steppers.

If you still have trouble, please be more specific than "it doesn't work" and I will try to help. Also describe what you have tried.

First off I have to tank Mr GroundFungus for his amazing help with this I'd been swearing about this for ages. I'm consistently humbled that people will give their expertise with no expectation of payment to help people like us ..

Just a tiny "Additional Information" , some of the PCBS have a "Generic" Nano on them ... I found this program did not work with them and you needed a genuine Arduino Nano, otherwise it failed to work.

I'm about to embark on the same journey that so many of you have but I just need to ask one question before I spend lots of money building a whole motion control rig. Can't afford to waste any money right now.

Once you get the Arduino Uno communicating with Dragonframe is it possible to use the video recording functions? I don't need stop motion, I need video functionality. As in controlling all the stepper motors, settings keyframes and then hitting play and it plays through in real time.

Sorry if that's a confusing question I've only seen videos of Dragonframe and am totally new to arduino but hopefully you understand what I mean.

The reason I ask is that in the ReadMe of this DFmoco sketch, it specifically says:

"Note: This is NOT a REAL TIME solution.
This is a simple, low cost, motion control solution for stop motion and time-lapse.
Dragonframe will move all of your motors to position for frame 1, then shoot, then
move all of your motors to position for frame 2."

https://courses.ideate.cmu.edu/60-428/s2018/ref/text/resrc/DFMocoCNC.html

It would be amazing if someone can confirm this will work for me. Thanks!