VoronKlipper

Raspberry PiでOLEDを使用する

Autodesk(オートデスク)

手順

Raspberry PiをセカンダリMCUとして動作するためのマイクロコントローラーコードをコンパイルする方法を紹介します。Windows PowerShellを使用してSSHでログインして作業しました。

以下の機種で動作確認しました。

  • Raspberry Pi 3B+ (MainsailOS)
  • Raspberry Pi 4 4GB (MainsailOS)

rcスクリプトをインストールします

cd ~/klipper/
sudo cp "./scripts/klipper-mcu-start.sh" /etc/init.d/klipper_mcu
sudo update-rc.d klipper_mcu defaults

マイクロコントローラーコードの構築

新しいマイクロコントローラーコードをビルドしてインストールするには、次のコマンドを実行します。

cd ~/klipper/
make menuconfig
[*] Enable extra low-level configuration options
    Micro-controller Architecture (Linux process)  --->
()  GPIO pins to set at micro-controller startup
( ) Atmega AVR
( ) SAM3/SAM4/SAM E70 (Due and Duet)
( ) SAMD21/SAMD51
( ) LPC176x (Smoothieboard)
( ) STMicroelectronics STM32
( ) Raspberry Pi RP2040
( ) Beaglebone PRU
(X) Linux process
( ) Host simulator

メニューで、「マイクロコントローラーアーキテクチャ」を「Linuxプロセス」に設定し、[Q][Y]で保存して終了します。

コンパイル

新しいマイクロコントローラーコードをビルドしてインストールするには、次のコマンドを実行します。

sudo service klipper stop
make flash
sudo service klipper start

「pi」ユーザーをttyグループに追加します。

sudo usermod -a -G tty pi

OLEDモジュールを使用する

OLEDモジュールを使用するためにインターフェイスオプションでI2Cを有効にします。

sudo raspi-config
1 System Options       Configure system settings
2 Display Options      Configure display settings
3 Interface Options    Configure connections to peripherals
4 Performance Options  Configure performance settings 
5 Localisation Options Configure language and regional settings
6 Advanced Options     Configure advanced settings
8 Update               Update this tool to the latest version
9 About raspi-config   Information about this configuration tool
P1 Camera      Enable/disable connection to the Raspberry Pi Camera
P2 SSH         Enable/disable remote command line access using SSH
P3 VNC         Enable/disable graphical remote access using RealVNC
P4 SPI         Enable/disable automatic loading of SPI kernel module
P5 I2C         Enable/disable automatic loading of I2C kernel module
P6 Serial Port Enable/disable shell messages on the serial connection
P7 1-Wire      Enable/disable one-wire interface
P8 Remote GPIO Enable/disable remote access to GPIO pins

参考サイト

GitHub - seya128/Voron0.1_skirt_OLEDandRotaryEncoder
Contribute to seya128/Voron0.1_skirt_OLEDandRotaryEncoder development by creating an account on GitHub.
https://www.klipper3d.org/RPi_microcontroller.html
タイトルとURLをコピーしました