0. 接続のようす
Arduino側
モーター側
1. 仕様メモ
Arduino Mega
VINは、12V(9V~18Vで動作)を繋いでテストしました
ケーブル1(2芯): 電源線
| arduino mega | motor |
|---|---|
| GND | 黒 |
| VIN | 赤 |
ケーブル2(4芯): 信号線
| arduino mega | motor |
|---|---|
| GND | 茶 |
| RX1 | オレンジ |
| TX1 | 白 |
| 接続不要 | 黒 |
使用するモーター
2. コード関連
ほぼ下記のライブラリをそのまま使っていますが、一部Arduino用に変更を加えています
ArduinoSTL.hで「multiple definition of `std::nothrow'」が出る
下記、22行目あたりをコメントアウトにする
ArduinoSTL/src/new_handler.cpp
// const std::nothrow_t std::nothrow = { };
詳しくは下記を参照
修正したコード
サンプルはspin_the_motor.inoのみ更新しています
3. その他
下記のStepファイルをベースに、簡易的なアタッチメントを作成

