What have you tried and what didn't work ?
Which Arduino are you using ? What CNC hardware are you using ?