2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Bluetoothスピーカー実験ボードをPlatformIOで動かす

Last updated at Posted at 2022-09-24

BitTradeOneさんより、
音と光の実験ボード「 Connected Doll」
が発売になりました。
image.png
image.png

今回はこれのサンプルプログラムをWin/PlatformIOから動かしてみたいと思います。

まずはこちらからサンプルをダウンロードします。
https://github.com/bit-trade-one/ADE32CD-Connected-Doll/
今回はBluetoothスピーカーのチェック用サンプルを動かすだけなので、Git UrlからCloneしてもDownloadZIPでダウンロードしても大丈夫です。

2022-09-24_200854.png

次に空のプロジェクトを作成します。BoardはEspressif ESP32 Dev Moduleを選択します。
2022-09-24_194619.png

プロジェクトを作成したら、main.cppを削除し、先ほどBitTradeOneのGitHubよりダウンロードしたフォルダから
bt_speaker_demo.inoをsrcフォルダに入れます。
2022-09-24_194826.png
この状態だとライブラリが不足しており、

#include "BluetoothA2DPSink.h"
#include <FastLED.h>

のところに波線が入っていると思いますので、これを解決します。

2022-09-24_195550.png

からライブラリをダウンロードし、libの下にドラッグ&ドロップします。

image.png

次にFastLEDですが、こちらはPlaiformIOのライブラリにあるのでそちらを使用します。
Librariesタブを選択し、検索窓にFastLEDと入力するとライブラリが出てくるので選択します。
image.png

選択したら現在のプロジェクトを選択しインストールします。
2022-09-24_200107.png

これで波線が消えたと思います。
2022-09-24_200145.png

ビルドの準備が終わったので、実験ボードを接続してビルドをします。エラーが出なければ成功です。
成功するとPCからBT_Musicという名前でBluetoothデバイスを見つけることができるようになるので、これを追加します。

2022-09-24_200437.png

BTO_Musicを選択し、youtubeなどを再生し、音が出ることを確認してください。
image.png

おつかれさまでした。
image.png

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?