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

コードクラフトの使い方

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

https://ide.tinkergen.comarrow-up-right

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

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

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

helloworld-3-2.png

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

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

hw_3_4.png

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

・Touch Sensorを使う場合

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

Digitalソケットに接続

コード例

Sound Sensorを使う場合

Analogソケットに接続

コード組合せ例

2-2.png

・Digital PIR Sensorを使う場合

Digitalソケットに接続

コード組合せ例

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

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

https://www.youtube.com/watch?v=CxGI-MzCGWMarrow-up-right

I2Cソケットに接続

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

https://github.com/petoicamp/balltrackingarrow-up-right

からZip Fileをダウンロード

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

https://github.com/mu-opensource/MuVisionSensor3arrow-up-right

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 ModuleTestsarrow-up-right folder if you download the whole OpenCat repository.

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

Grove - Sound Sensor/ Noise Detectorarrow-up-right

Grove - Light Sensor v1.2 - LS06-S phototransistorarrow-up-right

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 codearrow-up-right, we use the fourth socket with D6 and D7.

Grove - Touch Sensorarrow-up-right

Grove - Infrared Reflective Sensor v1.2arrow-up-right

Grove - mini PIR motion sensorarrow-up-right

The intelligent cameraarrow-up-right, gesturearrow-up-right, and OLEDarrow-up-right module should be connected to the I2C Grove socket.

Grove - Gesture Sensor for Arduino (PAJ7620U2)arrow-up-right

Grove - OLED Display 0.96" (SSD1315)arrow-up-right

MU Vision Sensor 3arrow-up-right

Last updated

Was this helpful?