Deploying to gh-pages from @ Klipper3d/klipper@e93f39444c 🚀

This commit is contained in:
KevinOConnor committed 2023-03-28 00:39:14 +00:00
1 parent 01e6704db1
commit 06b4a3c298
32 files changed
+198 -2

No files matched your search

+197 -1
View File
@@ -735,6 +735,26 @@
ADXL345
</a>
<nav class="md-nav" aria-label="ADXL345">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#direct-to-raspberry-pi" class="md-nav__link">
Direct to Raspberry Pi
</a>
</li>
<li class="md-nav__item">
<a href="#using-raspberry-pi-pico" class="md-nav__link">
Using Raspberry Pi Pico
</a>
</li>
</ul>
</nav>
</li>
</ul>
@@ -787,6 +807,33 @@
Configure ADXL345 With RPi
</a>
</li>
<li class="md-nav__item">
<a href="#configure-adxl345-with-pi-pico" class="md-nav__link">
Configure ADXL345 With Pi Pico
</a>
<nav class="md-nav" aria-label="Configure ADXL345 With Pi Pico">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#flash-the-pico-firmware" class="md-nav__link">
Flash the Pico Firmware
</a>
</li>
<li class="md-nav__item">
<a href="#configure-the-connection" class="md-nav__link">
Configure the Connection
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
@@ -1480,6 +1527,26 @@
ADXL345
</a>
<nav class="md-nav" aria-label="ADXL345">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#direct-to-raspberry-pi" class="md-nav__link">
Direct to Raspberry Pi
</a>
</li>
<li class="md-nav__item">
<a href="#using-raspberry-pi-pico" class="md-nav__link">
Using Raspberry Pi Pico
</a>
</li>
</ul>
</nav>
</li>
</ul>
@@ -1532,6 +1599,33 @@
Configure ADXL345 With RPi
</a>
</li>
<li class="md-nav__item">
<a href="#configure-adxl345-with-pi-pico" class="md-nav__link">
Configure ADXL345 With Pi Pico
</a>
<nav class="md-nav" aria-label="Configure ADXL345 With Pi Pico">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#flash-the-pico-firmware" class="md-nav__link">
Flash the Pico Firmware
</a>
</li>
<li class="md-nav__item">
<a href="#configure-the-connection" class="md-nav__link">
Configure the Connection
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
@@ -1685,6 +1779,7 @@ SCLK+CS
</code></pre></div>
<h5 id="adxl345">ADXL345<a class="headerlink" href="#adxl345" title="Permanent link">&para;</a></h5>
<h6 id="direct-to-raspberry-pi">Direct to Raspberry Pi<a class="headerlink" href="#direct-to-raspberry-pi" title="Permanent link">&para;</a></h6>
<p><strong>Note: Many MCUs will work with an ADXL345 in SPI mode(eg Pi Pico), wiring and
configuration will vary according to your specific board and available pins.</strong></p>
<p>You need to connect ADXL345 to your Raspberry Pi via SPI. Note that the I2C
@@ -1733,6 +1828,58 @@ and <strong>will not work</strong>. The recommended connection scheme:</p>
</table>
<p>Fritzing wiring diagrams for some of the ADXL345 boards:</p>
<p><img alt="ADXL345-Rpi" src="img/adxl345-fritzing.png" /></p>
<h6 id="using-raspberry-pi-pico">Using Raspberry Pi Pico<a class="headerlink" href="#using-raspberry-pi-pico" title="Permanent link">&para;</a></h6>
<p>You may connect the ADXL345 to your Raspberry Pi Pico and then connect the
Pico to your Raspberry Pi via USB. This makes it easy to reuse the
accelerometer on other Klipper devices, as you can connect via USB instead
of GPIO. The Pico does not have much processing power, so make sure it is
only running the accelerometer and not performing any other duties.</p>
<p>In order to avoid damage to your RPi make sure to connect the ADXL345 to 3.3V
only. Depending on the board's layout, a level shifter may be present, which
makes 5V dangerous for your RPi.</p>
<table>
<thead>
<tr>
<th align="center">ADXL345 pin</th>
<th align="center">Pico pin</th>
<th align="center">Pico pin name</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">3V3 (or VCC)</td>
<td align="center">36</td>
<td align="center">3.3V DC power</td>
</tr>
<tr>
<td align="center">GND</td>
<td align="center">38</td>
<td align="center">Ground</td>
</tr>
<tr>
<td align="center">CS</td>
<td align="center">2</td>
<td align="center">GP1 (SPI0_CSn)</td>
</tr>
<tr>
<td align="center">SDO</td>
<td align="center">1</td>
<td align="center">GP0 (SPI0_RX)</td>
</tr>
<tr>
<td align="center">SDA</td>
<td align="center">5</td>
<td align="center">GP3 (SPI0_TX)</td>
</tr>
<tr>
<td align="center">SCL</td>
<td align="center">4</td>
<td align="center">GP2 (SPI0_SCK)</td>
</tr>
</tbody>
</table>
<p>Wiring diagrams for some of the ADXL345 boards:</p>
<p><img alt="ADXL345-Pico" src="img/adxl345-pico.png" /></p>
<h4 id="i2c-accelerometers">I2C Accelerometers<a class="headerlink" href="#i2c-accelerometers" title="Permanent link">&para;</a></h4>
<p>Suggested twisted pair order:</p>
<div class="highlight"><pre><span></span><code>3.3V+SDA
@@ -1862,6 +2009,53 @@ probe_points:
<p>It is advised to start with 1 probe point, in the middle of the print bed,
slightly above it.</p>
<h4 id="configure-adxl345-with-pi-pico">Configure ADXL345 With Pi Pico<a class="headerlink" href="#configure-adxl345-with-pi-pico" title="Permanent link">&para;</a></h4>
<h5 id="flash-the-pico-firmware">Flash the Pico Firmware<a class="headerlink" href="#flash-the-pico-firmware" title="Permanent link">&para;</a></h5>
<p>On your Raspberry Pi, compile the firmware for the Pico.</p>
<div class="highlight"><pre><span></span><code>cd ~/klipper
make clean
make menuconfig
</code></pre></div>
<p><img alt="Pico menuconfig" src="img/klipper_pico_menuconfig.png" /></p>
<p>Now, while holding down the <code>BOOTSEL</code> button on the Pico, connect the Pico to
the Raspberry Pi via USB. Compile and flash the firmware.</p>
<div class="highlight"><pre><span></span><code>make flash FLASH_DEVICE=first
</code></pre></div>
<p>If that fails, you will be told which <code>FLASH_DEVICE</code> to use. In this example,
that's <code>make flash FLASH_DEVICE=2e8a:0003</code>.
<img alt="Determine flash device" src="img/flash_rp2040_FLASH_DEVICE.png" /></p>
<h5 id="configure-the-connection">Configure the Connection<a class="headerlink" href="#configure-the-connection" title="Permanent link">&para;</a></h5>
<p>The Pico will now reboot with the new firmware and should show up as a serial
device. Find the pico serial device with <code>ls /dev/serial/by-id/*</code>. You can
now add an <code>adxl.cfg</code> file with the following settings:</p>
<div class="highlight"><pre><span></span><code>[mcu adxl]
# Change &lt;mySerial&gt; to whatever you found above. For example,
# usb-Klipper_rp2040_E661640843545B2E-if00
serial: /dev/serial/by-id/usb-Klipper_rp2040_&lt;mySerial&gt;
[adxl345]
cs_pin: adxl:gpio1
spi_bus: spi0a
axes_map: x,z,y
[resonance_tester]
accel_chip: adxl345
probe_points:
# Somewhere slightly above the middle of your print bed
147,154, 20
[output_pin power_mode] # Improve power stability
pin: adxl:gpio23
</code></pre></div>
<p>If setting up the ADXL345 configuration in a separate file, as shown above,
you'll also want to modify your <code>printer.cfg</code> file to include this:</p>
<div class="highlight"><pre><span></span><code>[include adxl.cfg] # Comment this out when you disconnect the accelerometer
</code></pre></div>
<p>Restart Klipper via the <code>RESTART</code> command.</p>
<h4 id="configure-mpu-60009000-series-with-rpi">Configure MPU-6000/9000 series With RPi<a class="headerlink" href="#configure-mpu-60009000-series-with-rpi" title="Permanent link">&para;</a></h4>
<p>Make sure the Linux I2C driver is enabled and the baud rate is
set to 400000 (see <a href="RPi_microcontroller.html#optional-enabling-i2c">Enabling I2C</a>
@@ -1916,7 +2110,9 @@ free-fall acceleration, e.g.</p>
</code></pre></div>
<p>If you get an error like <code>Invalid adxl345 id (got xx vs e5)</code>, where <code>xx</code>
is some other ID, it is indicative of the connection problem with ADXL345,
is some other ID, immediately try again. There's an issue with SPI
initialization. If you still get an error, it is indicative of the connection
problem with ADXL345,
or the faulty sensor. Double-check the power, the wiring (that it matches
the schematics, no wire is broken or loose, etc.), and soldering quality.</p>
<p><strong>If you are using MPU-6000/9000 series accelerometer and it show up as <code>mpu-unknown</code>, use with
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"index.html","text":"Klipper is a 3d-Printer firmware. It combines the power of a general purpose computer with one or more micro-controllers. See the features document for more information on why you should use Klipper. To begin using Klipper start by installing it. Klipper is Free Software. Read the documentation or view the Klipper code on github . We depend on the generous support from our sponsors .","title":"Welcome"},{"location":"API_Server.html","text":"API server \u00b6 This document describes Klipper's Application Programmer Interface (API). This interface enables external applications to query and control the Klipper host software. Enabling the API socket \u00b6 In order to use the API server, the klippy.py host software must be started with the -a parameter. For example: ~/klippy-env/bin/python ~/klipper/klippy/klippy.py ~/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log This causes the host software to create a Unix Domain Socket. A client can then open a connection on that socket and send commands to Klipper. See the Moonraker project for a popular tool that can forward HTTP requests to Klipper's API Server Unix Domain Socket. Request format \u00b6 Messages sent and received on the socket are JSON encoded strings terminated by an ASCII 0x03 character: <json_object_1><0x03><json_object_2><0x03>... Klipper contains a scripts/whconsole.py tool that can perform the above message framing. For example: ~/klipper/scripts/whconsole.py /tmp/klippy_uds This tool can read a series of JSON commands from stdin, send them to Klipper, and report the results. The tool expects each JSON command to be on a single line, and it will automatically append the 0x03 terminator when transmitting a request. (The Klipper API server does not have a newline requirement.) API Protocol \u00b6 The command protocol used on the communication socket is inspired by json-rpc . A request might look like: {\"id\": 123, \"method\": \"info\", \"params\": {}} and a response might look like: {\"id\": 123, \"result\": {\"state_message\": \"Printer is ready\", \"klipper_path\": \"/home/pi/klipper\", \"config_file\": \"/home/pi/printer.cfg\", \"software_version\": \"v0.8.0-823-g883b1cb6\", \"hostname\": \"octopi\", \"cpu_info\": \"4 core ARMv7 Processor rev 4 (v7l)\", \"state\": \"ready\", \"python_path\": \"/home/pi/klippy-env/bin/python\", \"log_file\": \"/tmp/klippy.log\"}} Each request must be a JSON dictionary. (This document uses the Python term \"dictionary\" to describe a \"JSON object\" - a mapping of key/value pairs contained within {} .) The request dictionary must contain a \"method\" parameter that is the string name of an available Klipper \"endpoint\". The request dictionary may contain a \"params\" parameter which must be of a dictionary type. The \"params\" provide additional parameter information to the Klipper \"endpoint\" handling the request. Its content is specific to the \"endpoint\". The request dictionary may contain an \"id\" parameter which may be of any JSON type. If \"id\" is present then Klipper will respond to the request with a response message containing that \"id\". If \"id\" is omitted (or set to a JSON \"null\" value) then Klipper will not provide any response to the request. A response message is a JSON dictionary containing \"id\" and \"result\". The \"result\" is always a dictionary - its contents are specific to the \"endpoint\" handling the request. If the processing of a request results in an error, then the response message will contain an \"error\" field instead of a \"result\" field. For example, the request: {\"id\": 123, \"method\": \"gcode/script\", \"params\": {\"script\": \"G1 X200\"}} might result in an error response such as: {\"id\": 123, \"error\": {\"message\": \"Must home axis first: 200.000 0.000 0.000 [0.000]\", \"error\": \"WebRequestError\"}} Klipper will always start processing requests in the order that they are received. However, some request may not complete immediately, which could cause the associated response to be sent out of order with respect to responses from other requests. A JSON request will never pause the processing of future JSON requests. Subscriptions \u00b6 Some Klipper \"endpoint\" requests allow one to \"subscribe\" to future asynchronous update messages. For example: {\"id\": 123, \"method\": \"gcode/subscribe_output\", \"params\": {\"response_template\":{\"key\": 345}}} may initially respond with: {\"id\": 123, \"result\": {}} and cause Klipper to send future messages similar to: {\"params\": {\"response\": \"ok B:22.8 /0.0 T0:22.4 /0.0\"}, \"key\": 345} A subscription request accepts a \"response_template\" dictionary in the \"params\" field of the request. That \"response_template\" dictionary is used as a template for future asynchronous messages - it may contain arbitrary key/value pairs. When sending these future asyncLine truncated
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"index.html","text":"Klipper is a 3d-Printer firmware. It combines the power of a general purpose computer with one or more micro-controllers. See the features document for more information on why you should use Klipper. To begin using Klipper start by installing it. Klipper is Free Software. Read the documentation or view the Klipper code on github . We depend on the generous support from our sponsors .","title":"Welcome"},{"location":"API_Server.html","text":"API server \u00b6 This document describes Klipper's Application Programmer Interface (API). This interface enables external applications to query and control the Klipper host software. Enabling the API socket \u00b6 In order to use the API server, the klippy.py host software must be started with the -a parameter. For example: ~/klippy-env/bin/python ~/klipper/klippy/klippy.py ~/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log This causes the host software to create a Unix Domain Socket. A client can then open a connection on that socket and send commands to Klipper. See the Moonraker project for a popular tool that can forward HTTP requests to Klipper's API Server Unix Domain Socket. Request format \u00b6 Messages sent and received on the socket are JSON encoded strings terminated by an ASCII 0x03 character: <json_object_1><0x03><json_object_2><0x03>... Klipper contains a scripts/whconsole.py tool that can perform the above message framing. For example: ~/klipper/scripts/whconsole.py /tmp/klippy_uds This tool can read a series of JSON commands from stdin, send them to Klipper, and report the results. The tool expects each JSON command to be on a single line, and it will automatically append the 0x03 terminator when transmitting a request. (The Klipper API server does not have a newline requirement.) API Protocol \u00b6 The command protocol used on the communication socket is inspired by json-rpc . A request might look like: {\"id\": 123, \"method\": \"info\", \"params\": {}} and a response might look like: {\"id\": 123, \"result\": {\"state_message\": \"Printer is ready\", \"klipper_path\": \"/home/pi/klipper\", \"config_file\": \"/home/pi/printer.cfg\", \"software_version\": \"v0.8.0-823-g883b1cb6\", \"hostname\": \"octopi\", \"cpu_info\": \"4 core ARMv7 Processor rev 4 (v7l)\", \"state\": \"ready\", \"python_path\": \"/home/pi/klippy-env/bin/python\", \"log_file\": \"/tmp/klippy.log\"}} Each request must be a JSON dictionary. (This document uses the Python term \"dictionary\" to describe a \"JSON object\" - a mapping of key/value pairs contained within {} .) The request dictionary must contain a \"method\" parameter that is the string name of an available Klipper \"endpoint\". The request dictionary may contain a \"params\" parameter which must be of a dictionary type. The \"params\" provide additional parameter information to the Klipper \"endpoint\" handling the request. Its content is specific to the \"endpoint\". The request dictionary may contain an \"id\" parameter which may be of any JSON type. If \"id\" is present then Klipper will respond to the request with a response message containing that \"id\". If \"id\" is omitted (or set to a JSON \"null\" value) then Klipper will not provide any response to the request. A response message is a JSON dictionary containing \"id\" and \"result\". The \"result\" is always a dictionary - its contents are specific to the \"endpoint\" handling the request. If the processing of a request results in an error, then the response message will contain an \"error\" field instead of a \"result\" field. For example, the request: {\"id\": 123, \"method\": \"gcode/script\", \"params\": {\"script\": \"G1 X200\"}} might result in an error response such as: {\"id\": 123, \"error\": {\"message\": \"Must home axis first: 200.000 0.000 0.000 [0.000]\", \"error\": \"WebRequestError\"}} Klipper will always start processing requests in the order that they are received. However, some request may not complete immediately, which could cause the associated response to be sent out of order with respect to responses from other requests. A JSON request will never pause the processing of future JSON requests. Subscriptions \u00b6 Some Klipper \"endpoint\" requests allow one to \"subscribe\" to future asynchronous update messages. For example: {\"id\": 123, \"method\": \"gcode/subscribe_output\", \"params\": {\"response_template\":{\"key\": 345}}} may initially respond with: {\"id\": 123, \"result\": {}} and cause Klipper to send future messages similar to: {\"params\": {\"response\": \"ok B:22.8 /0.0 T0:22.4 /0.0\"}, \"key\": 345} A subscription request accepts a \"response_template\" dictionary in the \"params\" field of the request. That \"response_template\" dictionary is used as a template for future asynchronous messages - it may contain arbitrary key/value pairs. When sending these future asyncLine truncated
BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
View File
Binary file not shown.