5,710
edits
Changes
GRBL
,→Storing Home
[[Home | <<< back to Wiki Home]]
*Download GRBL: https://github.com/grbl/grbl/archive/master.zip
*unzip grbl-master
*Set the following environment variabels (i.e. run these commands in the terminal):
<syntaxhighlight lang="bash">
export AVRPATH=/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/
</syntaxhighlight>
<syntaxhighlight lang="bash">
</syntaxhighlight>
**NOTE: replace <code>~/Downloads</code> with the full path where you downloaded GRBL.
*Compile GRBL. In the grbl-master director, type: <codesyntaxhighlight lang="bash">make</codesyntaxhighlight>. GRBL should compile.
*Upload GRBL to the arduino. From the grbl-master directory, run:
<syntaxhighlight lang="bash">
</syntaxhighlight>
adapted from here: https://github.com/grbl/grbl/wiki/Flashing-Grbl-to-an-Arduino
==Upload to Nano V3.0 (slower baud rate)==
Needs 57600 baud rate instead of default uno 115200
<syntaxhighlight lang="bash">
$AVRPATH/bin/avrdude -C$AVRPATH/etc/avrdude.conf -b57600 -pm328p -carduino -P$DEVPATH -D -Uflash:w:$GRBLHEX
</syntaxhighlight>
== How to connect pins of Arduino for GRBL ==
These are the standard GCode commands implemented by GRBL:
* https://github.com/grbl/grbl/wiki
==Getting Started with GRBL Commands==
Some basic GRBL commands
*How to pull up the help menu: <code>$</code>
*fast move (G0) (a.k.a "seek")
*slow move (G1)
*Absolute vs. Relative positioning:
<pre>
G90 # absolute positioning
G92 X10.0 y1.0 # set coordinates of current position
</pre>
*Homing routines. what is a homing routine.
*feed hold and resume.
*interrupting a command and starting something totally new (though keeping your position information)
**reset GRBL.<code>ctrl-x</code>
*querying your position: <code>?</code>
*How to configure GRBL: see next section.
== My GRBL Settings ==
</pre>
https://github.com/grbl/grbl/blob/master/config.h#L194
==Storing Home==
# Home: <syntaxhighlight lang="bash">$H</syntaxhighlight>
# Query position: <syntaxhighlight lang="bash">?</syntaxhighlight> response <syntaxhighlight lang="bash"><Idle,MPos:0.000,199.800,0.000,WPos:0.000,0.002,0.000></syntaxhighlight>
# Store home (using X and Y from query, 0 and 199.8 in the example above): <syntaxhighlight lang="bash">G10L2P0X0Y199.8</syntaxhighlight>
# Query again to check that it worked: <syntaxhighlight lang="bash">?</syntaxhighlight> WPos should be 0,0,0 <syntaxhighlight lang="bash"><Idle,MPos:0.000,199.800,0.000,WPos:0.000,0.000,0.000></syntaxhighlight>
=GIKFUN wch340 serial=
*disable system integrity protection:
**boot into recovery: CMD-r
**open terminal
**run:
<syntaxhighlight lang="bash">csrutil disable</syntaxhighlight>
*install driver http://www.wch.cn/download/CH341SER_MAC_ZIP.html
reference: https://tzapu.com/making-ch340-ch341-serial-adapters-work-under-el-capitan-os-x/