Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Homepage
個人的覚書です。 勝手に使うのは自己責任でお願いします。
L6470¶
バイポーラステッピングモータドライバ
使い方¶
プログラムをインポート ヘッダファイルを開いて、 初期パラメータを変更(必須)
あとは、データシート通りの命令が使える
- include <L6470.h>
L6470 stepper1(mosi,miso,sck,cs)
NOP()
SetParam(int param,int value)
int GetParam(int param)
Run(unsigned char dir,int spd) 速度でまわす
StepClock(unsigned char dir)
Move(unsigned char dir,int n_step) n_step(マイクロステップ ステップ数)回す
GoTo(int abs_pos) 絶対位置で回す
GoTo_DIR(unsigned char dir,int abs_pos)
GoUntil(unsigned char act,unsigned char dir,int spd)
ReleaseSW(unsigned char act,unsigned char dir)
GoHome()
GoMark()
ResetPos()
ResetDevice()
SoftStop() 停まる
SoftHiZ()
HardHiZ()
オリジナル命令
Resets() モータに初期パラメータを書き込む
リビジョン¶
ver1.1を公開したが、手元にL6470がないので、動作未確認