i have bought a cnc machine that has a arduino uno , i plan to produce this kind of machins using arduino uno , my problem and question is : how can i copy that cnc mashin arduino codes . is there a way to copy them or not ?
iam looking forward to hearing an answer from you .
If the code (firmware) runs on an Uno it may be Grbl. If it is, you can download Grbl. The linked page has links to instructions for configuring Grbl for a new machine. There are commands that you can send to Grbl to get the settings from the source machine.
gharaei:
Thanks a lot for you answers , but i could find nothing about how to copy codes from an arduino boarded on a machine ,
You don't. The code in the Arduino driving the CNC machine is the GRBL interpreter code which you can download to your pc from the web site. Then download it to the new Arduino on the CNC machine.
Your PC GRBL program reads the data file and creates the "G" and "M" codes to send to the Arduino/interpreter program running on the CNC machine.
After you have downloaded and installed Grbl to the new Uno, you can get the setup of the original machine by connecting to Grbl on the original machine with a terminal program (Serial monitor will do) and sending the $$ command to Grbl. Grbl will respond with the current settings of the machine. You can then copy the settings to the new machine. See the Grbl configuration page for more information.
hello thanks for you replies . i did what you said i entered $$ command but i received below code , I need to get the code that the coder used to make that cnc machine and uploaded to it's arduino .
any advice ?
iam looking forward to hearing an answer
best regards .
iam looking for a way to make that cnc machine myself and because of that iam gonna need the codes ( for example the code below ) and upload it to my own arduino and make a duplication .
/*
LiquidCrystal Library - Hello World
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2
LCD R/W pin to ground
LCD VSS pin to ground
LCD VCC pin to 5V
10K resistor:
ends to +5V and ground
wiper to LCD VO pin (pin 3)
Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe
This example code is in the public domain.
*/
// include the library code: #include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8,9,4,5,6,7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Salam");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
lcd.print("00000000003 (^_^)");
}
You can download the compiled code from an Arduino using AVRDUDE. So long as the originator hasn't locked it, which is pretty rare.
If you have identical hardware then you can upload this binary to as many copies as you want. You can even keep this as a backup of the original firmware while you try uploading other programs to the original Arduino.
However you cannot recover the original C++ code from the Arduino. If the original programmer won't sell or give it to you then you have no way to make modifications.
gharaei:
hello thanks for you replies . i did what you said i entered $$ command but i received below code , I need to get the code that the coder used to make that cnc machine and uploaded to it's arduino .
If you got that output from GRBL on the machine that you wish to replicate then it seems to me all you need to do is to load a new copy of GRBL onto your new machine and enter the same values into it.
ok , because i'am amateur now and i can not write c++ codes myself , if i could get them from another cnc machine that would be great
when i write command $$ i get some codes yes but they are not the c++ codes that i need to upload to my arduino and make a duplication of that machine .