Commit 0f5b5594 by Hideaki Tai

add README

parent 9b0c896e
## ビルド
Visual Studio Code をインストールし、PlatformIO IDE のプラグインをインストールしてください。
## 速度・加減速を設定する
調整が必要になってくるのは、速度・加速度のパラメータぐらいかと思いますので、そこだけ記載します。
`src/main.cpp` 57行目 を変更することで変えられます。
```C++
whill.speed(SPEEDMODE::RS232C, 60, 90, 90, 60, 90, 90, 60, 90, 90); // for new whill firmware
```
順に、前進の速度・加速度・減速度、後進の速度・加速度・減速度、回転の速度・加速度・減速度、です。
速度については、値が1上がると0.1\[km/s\]、速度が上がります。
また、ライブラリ内部で下記のように制限をかけています。
速度は60 (6km/s) 以上に上げると、電源電圧が下がったときに速度制限をWHILLのコントローラ内部でかけてしまうようになるので、60以下で使ってほしいとのことです。
```C++
bool speed(SPEEDMODE mode, char f_m1, char f_a1, char f_d1, char r_m1, char r_a1, char r_d1, char t_m1, char t_a1, char t_d1)
{
f_m1 = constrain(f_m1, 8, 60); // less than 60 is better
f_a1 = constrain(f_a1, 10, 90);
f_d1 = constrain(f_d1, 40, 160);
r_m1 = constrain(r_m1, 8, 60); // less than 60 is better
r_a1 = constrain(r_a1, 10, 90);
r_d1 = constrain(r_d1, 40, 160);
t_m1 = constrain(t_m1, 8, 60); // less than 60 is better
t_a1 = constrain(t_a1, 10, 90);
t_d1 = constrain(t_d1, 40, 160);
}
```
  • Markdown is supported
    0% or
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or sign in to comment