概要
秋月電子で販売しているL6470使用ステッピングモータドライブキットをJetsonNanoで動かしてみた
使用ハード
結線
Jetson Nano | AE-L6470DRV | |
---|---|---|
Pin 19 (SPI_MOSI) | --> | CN4-7 (SDI) |
Pin 21 (SPI_MISO) | <-- | CN4-5 (SDO) |
Pin 23 (SPI1_SCK) | --> | CN4-6 (CK) |
Pin 24 (SPI1_CS0) | --> | CN4-8 (#CS) |
Pin 25 (GND) | <-> | CN4-3 (GND) |
ソフトウェア設定
-
JetsonNano SPI有効化
$ git clone https://github.com/rt-net/JetsonNano_DT_SPI.git $ cd JetsonNano_DT_SPI # 注意:JetsonNanoで使用しているイメージバージョンに合わせること $ git checkout R32.2.1
-
L6470コントロールライブラリ インストール
$ git clone https://github.com/DaiGuard/l6470 $ cd l6470 $ sudo python3 setup.py install
動作テスト
ライブラリに同封されているサンプルを実行してみる
$ cd l6470/samples
$ python3 sample_run.py