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
エンコーダの回転方向はデフォの状態の反対を正としたいならrotReverce()を呼び出すと反対になる.
22020/3/6 移動平均を使ってパルスを平滑化し,RPSを算出している. useAvePRS()を書くことで,エンコーダのパルスを時間平均しそのままRPSを算出する関数MoveAve_pulse_to_RPS()がタイマー割り込みで呼び出される.移動平均を使うことでエンコーダのパルスのばらつきを無くし,平均をとらないとガタガタになるRPSがそこそこ綺麗になる.3000usごとの割り込み.この時間が長いほど精度は高い.あとclass内で配列の格納数をconst int で定義しているため黄色いエラーが出るけど無視. この方法でとったRPSの呼び出しはgetRPS()を使う.