-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from Jomo-desktop/ndev
ssh文档优化更新&增加lis2dw
- Loading branch information
Showing
50 changed files
with
816 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
# 加速度计 | ||
|
||
> [!TIP] | ||
> 建议使用Mellow的USB加速度计模块 | ||
<img src="../images/adv/accele/LIS2DW/LIS2DW_1.png" alt="LIS2DW_1" style="zoom:60%;" /> | ||
|
||
|
||
|
||
|
||
* 接线线序简单,直接type-c接到上位机 | ||
* 固定方便,免去改结构件的麻烦 | ||
|
||
## 1. 准备 | ||
|
||
1. LISD2W加速度计模块 | ||
2. 打印机 | ||
3. 连接线 | ||
|
||
## 2. 固件编译 | ||
|
||
> [!WARNING] | ||
> 出厂不带固件,请**编译并烧录固件**后再使用 | ||
### 2.1 更新klipper固件 | ||
|
||
> [!WARNING] | ||
> | ||
> 编译固件前请更新klipper固件,否则可能无法正常使用 | ||
使用ssh软件,输入以下更新命令: | ||
|
||
``` | ||
cd ~./klipper && git pull | ||
``` | ||
|
||
> [!TIPS] | ||
> | ||
> 如果更新不成功,也可尝试直接编译烧录,如果您的klipper版本过低则无法使用!!! | ||
### 2.2 固件编译 | ||
|
||
**固件编译如下图配置** | ||
|
||
![flash2](../images/adv/accele/LIS2DW/flash2.png) | ||
|
||
|
||
|
||
## 3. 固件烧录 | ||
|
||
1. 查看是否连接到USB加速度计的BOOT烧录模式 | ||
|
||
按住USB加速度计的BOOT键,然后将usb连接到上位机 | ||
|
||
![flash](../images/adv/accele/LIS2DW/flash.png) | ||
|
||
```bash | ||
lsusb | ||
``` | ||
|
||
执行上面的命令查看是否有 ``ID 2e8a:0003 Raspberry Pi RP2 Boot``这行,如没有请检查USB线(连接前记得按住BOOT键) | ||
|
||
![config](../images/boards/fly_sb2040/lsusb.png ":no-zooom") | ||
|
||
2. 烧录 | ||
|
||
```bash | ||
cd ~/klipper/ | ||
make flash FLASH_DEVICE=2e8a:0003 | ||
``` | ||
|
||
执行上面的命令可能会提示输入密码,输入当前用户的密码就好,输密码的时候是不可见的。输完之接按回车 | ||
|
||
出现下图则烧录成功 | ||
|
||
![flash](../images/boards/fly_sb2040/flash.png ":no-zooom") | ||
|
||
## 4. 配置和测试 | ||
|
||
> [!TIP] | ||
> 装加速度计依赖包安装方法如下 | ||
> [!TIP] | ||
> 建议使用**MobaXterm_Personal**等**SSH**工具操作 | ||
> [!TIP] | ||
> 此步骤使用于 `非FLY上位机`,如果您为`Fly-π`或者`Gemini`系列则无需执行!!! | ||
依次执行以下三条命令以安装加速度计依赖包。 | ||
|
||
```bash | ||
sudo apt update | ||
``` | ||
|
||
```bash | ||
sudo apt install python3-numpy python3-matplotlib libatlas-base-dev | ||
``` | ||
|
||
```bash | ||
~/klippy-env/bin/pip install -v numpy | ||
``` | ||
|
||
请注意,根据 CPU 的性能,可能需要*很多*时间,最多 10-20 分钟。请耐心等待完成 安装。在某些情况下,如果主板的 RAM 太少 安装可能会失败。 | ||
* 打开printer.cfg加入加速度计配置 | ||
|
||
```ini | ||
[mcu LIS] | ||
serial: /dev/serial/by-id/usb-Klipper_rp2040_XXXXXXXXXXXXXXXXXXXXX | ||
### 查询usb固件id是:ls -l /dev/serial/by-id/ | ||
### 把/dev/serial/by-id/usb-Klipper_rp2040_XXXXXXXXXXXXXXXXXXXXX替换查询到的id | ||
|
||
##ADXL345加速度计 | ||
[lis2dw] | ||
cs_pin: gpio9 | ||
spi_software_sclk_pin: gpio10 | ||
spi_software_mosi_pin: gpio11 | ||
spi_software_miso_pin: gpio12 | ||
|
||
[resonance_tester] | ||
accel_chip: lis2dw | ||
probe_points: 150, 150, 20 # 共振测试的坐标点 | ||
min_freq: 5 # 共振测试的最小频率 | ||
max_freq: 133 # 共振测试的最大频率 | ||
accel_per_hz: 75 # 每赫兹加速度(mm/sec),加速度=每赫兹加速度*频率,如果共振过于强烈,可以减少该值。默认75 | ||
hz_per_sec: 1 # 测试的速度,较小的值会加长测试时间,较大的值会降低测试精度,(Hz/sec == sec^-2),默认1 | ||
|
||
``` | ||
|
||
* 修改配置后保存并重启 | ||
* 在控制台执行`ACCELEROMETER_QUERY` | ||
* 多加速度计可指定测试某个`ACCELEROMETER_QUERY CHIP=bed` | ||
* 如果出现报错请检查接线及配置 | ||
* 正常的输出如下图 | ||
|
||
![ACCE](../images/adv/accele/acc4.png ":no-zooom") | ||
|
||
* 这样就可以来测量共振了 | ||
* 记得全部归位 | ||
* 测试X轴`TEST_RESONANCES AXIS=X`,Y轴也一样改为Y即可 | ||
|
||
> [!TIP] | ||
> 注意!如果测试过程中打印机振动太剧烈请及时按紧急停止或发送`M112`来停止 | ||
* 过高的`accel_per_hz`会让振动变得剧烈,可以适当降低 | ||
|
||
```ini | ||
[resonance_tester] | ||
accel_chip: adxl345 | ||
accel_per_hz: 50 # 默认值为75 | ||
probe_points: ... | ||
``` | ||
|
||
## 5. 自动校准 | ||
|
||
* klipper支持自动校准 | ||
* 记得全部归位 | ||
* `SHAPER_CALIBRATE`执行这个命令后打印机将开始自动校准X,Y | ||
* 在校准完成后执行`SAVE_CONFIG`来保存数据 | ||
* 也可以使用`SHAPER_CALIBRATE AXIS=X`来自动校准一个轴, | ||
* 在每个轴校准结束后都要先保存数据在校准下一个 | ||
|
||
![ACCE](../images/adv/accele/acc5.png ":no-zooom") | ||
|
||
* 校准过程可能会比较长,请耐心等待 | ||
|
||
## 6. USBadxl 3d模型 | ||
|
||
>[!WARNING] | ||
> | ||
>本地浏览器渲染模型较慢,建议将模型下载到本地计算机查看 | ||
```3dmodel | ||
https://cdn.mellow.klipper.cn/STEP/Fly-usb_adxl.step | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 1. 上位机40Pin引脚分布 | ||
|
||
![pinout](../../images/boards/fly_pi_v2/pinout.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# 1. 引脚分布 | ||
|
||
**Pin脚分布图制作中** | ||
![pins](../../images/boards/fly_c8/pins.jpg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
|
||
|
||
# 7. 连接到SSH | ||
|
||
* 请提前准备好MobaXterm或其他SSH终端工具 | ||
|
||
[MobaXterm下载链接:](https://mobaxterm.mobatek.net/download-home-edition.html "点击即可跳转"),选择右边的`` Installer edition`` | ||
|
||
## 1. 串口连接 | ||
|
||
* 使用USB Type-c线材将FLY-C8与电脑连接 | ||
|
||
<img src="../../images/boards/fly_c8/topc.png" alt="topc" style="zoom:80%;" /> | ||
|
||
* 如果主板与电脑连接正常,打开设备管理器,就可以看到CH340的端口了 | ||
|
||
<img src="../../images/system/aUART_dev.png" alt="aUART_dev" style="zoom:70%;" /> | ||
|
||
* 打开``MobaXterm``,进行如下设置,端口选择前面在设备管理器看到的端口 | ||
|
||
![aMoba_SSH1](../../images/system/aMoba_SSH1.png) | ||
|
||
<img src="../../images/system/aMoba_SSH4.png" alt="aMoba_SSH4" style="zoom:80%;" /> | ||
|
||
* 一切正常的话就可以看到启动画面了 | ||
|
||
<img src="../../images/system/aMoba_SSH5.png" alt="aMoba_SSH5" style="zoom:80%;" /> | ||
|
||
|
||
|
||
* 等待片刻,出现这个画面就是启动了 | ||
|
||
<img src="../../images/system/aMoba_SSH8.png" alt="aMoba_SSH8" style="zoom:80%;" /> | ||
|
||
**如果等了几分钟后,像下图一样,界面没有任何显示,按几下回车键即可** | ||
|
||
<img src="../../images/system/aMoba_SSH6.png" alt="aMoba_SSH6" style="zoom:80%;" /> | ||
|
||
**回车后会出现下图所示内容** | ||
|
||
<img src="../../images/system/aMoba_SSH7.png" alt="aMoba_SSH7" style="zoom:80%;" /> | ||
|
||
* 这时候需要切换用户,在ssh中输入:``su fly`` 后 再输入 ``cd ~`` | ||
|
||
<img src="../../images/system/aMoba_SSH9.png" alt="aMoba_SSH9" style="zoom:95%;" /> | ||
|
||
* 查看IP,如果配置了FLY-Config中的WIFI则开机后就会自动连接 | ||
|
||
> 使用ssh软件和Fly_Config连接WiFi可以参考:[连接WiFi](/board/fly_pi_v2/to_wifi "点击即可跳转") | ||
* 在终端中输入命令```ip a|grep inet```回车,在返回内容中找到与你路由器同段的IP即可访问 | ||
|
||
<img src="../../images/system/aMoba_SSH10.png" alt="aMoba_SSH10" style="zoom:80%;" /> | ||
|
||
|
||
|
||
## 2. 远程连接 | ||
|
||
* 如果主板已经启动且已经连接到网络,可以使用IP连接到SSH | ||
* 打开MobaXterm,进行如下设置,IP填写前面查看的,也可以在路由器后台查看 | ||
|
||
<img src="../../images/system/aMoba_SSH1.png" alt="aMoba_SSH1" style="zoom:80%;" /> | ||
|
||
**注意:这里第4步输入的``fly``为用户名** | ||
|
||
<img src="../../images/system/aMoba_SSH11.png" alt="aMoba_SSH11" style="zoom:80%;" /> | ||
|
||
|
||
|
||
* 第一次连接回弹出这个窗口,点击``Accept``即可 | ||
|
||
![putty](../../images/system/ssh7.png ":no-zooom") | ||
|
||
* 提示输入密码,输入```mellow```后回车 | ||
|
||
**注意:这里输入的密码是看不到的,输完后直接回车即可** | ||
|
||
用户名为:``fly`` | ||
|
||
密码为:`` mellow`` | ||
|
||
<img src="../../images/system/aMoba_SSH12.png" alt="aMoba_SSH12" style="zoom:80%;" /> | ||
|
||
<img src="../../images/system/aMoba_SSH13.png" alt="aMoba_SSH13" style="zoom:80%;" /> | ||
|
||
* 登录成功 | ||
|
||
* 至此,您已经完成FLY-π的配置 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.