Here we store code to play with G-code and
the PlotterBot: a Tiny CNC robot of 2-axes

Juan Keymer 59e2b0cbd7 Edit README 2 ماه پیش
README.md 59e2b0cbd7 Edit README 2 ماه پیش
TinyCNC_Gcode_XY_noZ.ino 176db076aa Initial commit 2 ماه پیش

README.md

PlotterBot Tiny CNC robot code

Here we can find code to play and hack with the PlotterBot, a Tiny CNC Robot. Note thre are two types of robots: a 2-Axes and a 3-axis. As we are interested in learning this to apply it to HomeScope we will focus here on hacking a 2-axes version.

The original codes can be located at:

https://github.com/MakerBlock/TinyCNC-Sketches

But since the idea is to play and learn about G-code to apply it to HomeScope, we post here our own version.

G code's name has a G from Geometry. It is an important language for robotics so it is useful to be aware of it.

We Hacked This file to produce the one listed here below.

For example to move in a line use: G1 X30 Y50 Other geometriic primitives are constructed but not called in the code.

Two things to Note:

(i) Servos are connecter at GPIOs 10 and 11 (not 9 and 10 as we use for Arduino_XY codes). (ii) Serial port communication for G-code commands is set to 115200 bts not the default 9600

We Hacked This file to produce ours. The code we have to play is:

TinyCNC_Gcode_XY_noZ.ino

Note the CNC robot moves more smoothly compared with oour raw Servo degrees code used in Arduino XY. Therefore XY code can be improved incorporating the mechanical aspects of gears used here. However it moves too fast as it is meant to draw. The speed under the microscope magnification should be considerably slower.

For further thought see: Mechanics considerations and Gear calculator