Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
a simple example of making a CNC machine from an Adafruit Motor Shield
Arduino C++ Processing
branch: master
Failed to load latest commit information.
GcodeCNCDemo2AxisV1 added arc() go demo2axisv1
GcodeCNCDemo2AxisV2 added arc() to demo2axisv2
GcodeCNCDemo4axisV2 5.3
GcodeCNCDemo6AxisRumba added arc() go demo2axisv1
GcodeCNCDemo6AxisRumbaTimerInterrupt 6
GcodeCNCDemo6AxisV2 5.3
arduino_libraries 6
.gitattributes 0
.gitignore 0
README.txt 10



This is a simple demonstration of a 2-axis CNC machine using an Arduino UNO and the Adafruit Motor Shield v1 and v2.

##Which files should I use?

If you have an Adafruit Motor Shield v1 then use GcodeCNCDemo2AxisV1.
If you have an Adafruit Motor Shield v2 then use GcodeCNCDemo2AxisV2, GcodeCNCDemo4AxisV2, or GcodeCNCDemo6AxisV2.
If you have a RUMBA controller then use GcodeCNCDemo6AxisRumba.

##Sending whole files

So you've used a demo to make a CNC machine, and now you want to deliver a whole file full of gcode.

See our sister project, the improved Arduino serial monitor:


You can use any of of the *V2 with an Adafruit Motor Shield v2.
With all V2 code you will have to change the address of the board.  Look for

  Adafruit_MotorShield AFMS0 = Adafruit_MotorShield(0x61);

and change the 0x61 to the address of your shield.




For the latest version please visit
For more info on Adafruit shields please visit
For more info on RUMBA controllers please visit

Dan Royer

Something went wrong with that request. Please try again.