Loading files
7be0145b4This file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/stack-chan-374381865.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
7be0145b4This file is pinned to the selected release. Download the original to open it in your design tool.
# ボタンで見回しを開始・停止する
[教材05](../../../lessons/README_ja.md)の次に、周期処理と注視を組み合わせる例です。SDK世代2のホストを使い、サーボを設定してください。
`firmware` ディレクトリーで実行します。
```sh
npm run mod -- mods/examples/look_around/manifest.json
```
主ボタンまたは画面の「実行」で開始します。5秒ごとに、左右30度・上20度から下5度の範囲で注視点を変えます。サーボの設定範囲が狭い場合は、その範囲に収めます。もう一度押すと更新を止め、注視を解除します。
変更するファイルは `mod.js` です。周期は `app.time.every` の引数(ms)、動きの範囲は `yawDeg` / `pitchDeg`(度)で指定しています。A/B/C の機種差や Timer の解除処理をアプリへ書く必要はありません。
サーボが使えない場合は設定確認を案内します。アプリを閉じると入力購読・周期処理・注視はホストが終了します。自動試験とWASMで確認済みで、実機の動作確認は未実施です。