10🔩 コードクラフトと拡張パック

コードクラフトの使い方

ペトイビトルのボードのカバーを外し、付属のUSBアダプターのチップを対応するピン穴に差し込みます。

https://ide.tinkergen.com

上記のウェブサイトにアクセスし”Bittle”をクリックします。

  1. “Device Assistant”をダウンロードする

Codecraftを初めて利用される方は”Device Assistant”が必要になります。”Connect”を押すと下記のような画面が表示されるので”Download Device Assistant”をクリックします。

インストールが完了後、フクロウのアイコンをクリックして起動します。起動させたら、再度”Connect”をクリックし自分で組んだコードをアップロードして完了です。

デバイスを繋ぐ際には「USBドングルを接続する」で選択したデバイスを選んでください。

GitHubのコードとCodeCraftのコードにはバージョンが異なるため動作をうまく行えません。CodeCraftで行う場合は一度コードクラフトのスキルをアップデートする必要があります。

・Touch Sensorを使う場合

下記の写真のようにセンサーをDigitalソケットに接続する。

Digitalソケットに接続

コード例

Sound Sensorを使う場合

Analogソケットに接続

コード組合せ例

・Digital PIR Sensorを使う場合

Digitalソケットに接続

コード組合せ例

・Intelligent Camera (Arduino IDEを用いた場合)

下記のURL先の動画を参考にしてください

https://www.youtube.com/watch?v=CxGI-MzCGWM

I2Cソケットに接続

カメラにある左から2番目を上にあげる

https://github.com/petoicamp/balltracking

からZip Fileをダウンロード

Zip Fileを展開して”BallTracking-main”を”BallTracking”に変更

https://github.com/mu-opensource/MuVisionSensor3

Zip Fileをダウンロード

Sketch>Include Library>add zip fileからダウンロードしたファイルを選択

WriteInstinctをアップロードしてシリアルモニターを開きYを三回

終了後

Ball Trackingをアップロード

(緑色の球体を追跡します)テニスボールなど

The head of Bittle is designed to be a clip to hold extensible modules. We compiled a sensor pack with some popular modules, but its contents may change in the future. You can also wire other add-ons thanks to the rich contents of the Arduino and Raspberry Pi community.

You can find the demo codes of these modules in our GitHub repository. They should be in the ModuleTests folder if you download the whole OpenCat repository.

The loudness and light level modules can generate analog readings for the corresponding signals and should be connected to the analog Grove socket.

The touch, reflection, PIR sensors can generate digital 1 or 0 as a switch signal. So they should be connected to the digital Grove socket. In the demo code, we use the fourth socket with D6 and D7.

The intelligent camera, gesture, and OLED module should be connected to the I2C Grove socket.

最終更新