<jupyter_start><jupyter_text>Grbl Module Examples<jupyter_code>import Grbl
# Where /dev/ttyUSB0 is the serial port the Grbl device shows up as.
grbl = Grbl.Grbl(port="/dev/ttyUSB4")<jupyter_output><empty_output><jupyter_text>Grbl Status Report.<jupyter_code>grbl.status<jupyter_output><empty_output><jupyter_text>Aim Laser Module<jupyter_code>grbl.aim_laser()<jupyter_output>Press Enter to start aiming laser.
Idle
Press Enter to stop aiming laser.
Idle<jupyter_text>Run GCode Directly<jupyter_code>grbl.x_steps_mm=83.66*2
# Move the X axis by 10 mm @ 100mm/min.
grbl.run("""
G21
G91
G0X-1F100
""")
grbl.status<jupyter_output><empty_output><jupyter_text>Jupyter Notebooks IntegrationType out g-code / grbl commands directly into a notebook<jupyter_code>from IPython.core.magic import register_cell_magic

@register_cell_magic
def grbl_cell_magic(cfg, cell):
    "# Sending G-Code"
    grbl.run(cell)<jupyter_output><empty_output><jupyter_text>Load SettingsLoad Settings.<jupyter_code>%%grbl_cell_magic

$0=10
$1=25
$2=0
$3=0
$4=0
$5=0
$6=0
$10=1
$11=0.010
$12=0.002
$13=0
$20=0
$21=0
$22=0
$23=0
$24=25.000
$25=500.000
$26=250
$27=1.000
$30=1000
$31=0
$32=1
$100=83.333
$101=83.333
$102=250.000
$110=500.000
$111=500.000
$112=500.000
$120=10.000
$121=10.000
$122=10.000
$130=200.000
$131=200.000
$132=200.000<jupyter_output><empty_output><jupyter_text>Down<jupyter_code># Move the X axis by 10 mm @ 100mm/min.
grbl.run("""
G21
G91
G0X0F100
G1X0F100
M3S100
G1X10F100
M5
""")
# Move the X axis by 10 mm @ 100mm/min.
grbl.run("""
G21
G91
G0X-10F100
""")
grbl.status
grbl.home()
grbl.cmd("$$")
grbl.reset()
grbl.cmd("$3=0")
grbl.x_steps_mm=grbl.x_steps_mm*16
# Move the X axis by 10 mm @ 100mm/min.
grbl.run("""
G21
G91
G0X1F100
""")
grbl.status<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14963297571993225, 'fraction_numerical': 0.15302089215132694, 'mean_word_length': 6.445378151260504, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '393870', 'license': 'MIT', 'n_tokens_mistral': 991, 'n_tokens_neox': 831, 'n_words': 153, 'path': 'Development/Examples-Copy1.ipynb', 'repo_name': 'dapperfu/python_Grbl', 'size': '1771'}