Opensourcetechブログ

OpensourcetechによるNGINX/Kubernetes/Zabbix/Neo4j/Linuxなどオープンソース技術に関するブログです。

ESP32開発ボードとBluetoothペアリングする

 

こんにちは、LinuCエバンジェリストこと、鯨井貴博@opensourcetechです。

 

ESP32開発ボードとBluetoothでペアリングするためのメモです。

 

ESP32開発ボードは、Bluetooth接続に対応しています。

https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf

f:id:opensourcetech:20200113215124j:plain

 

 

①PCとESP32をUSB接続する

充電だけでなく、データ通信もできるUSBケーブルでPCとESP32を接続します。

 

 

②Arduino IDEを起動する

インストールされていない方は、こちらを参考にインストールしてください。

 

 

③Bluetooth接続のサンプルスケッチを開く

Arduino IDEで、ファイル > スケッチ例 > BluetoothSerial > SerialToSerialBT を開きます。

f:id:opensourcetech:20200115220755p:plain

f:id:opensourcetech:20200115220930p:plain

 

 

④スケッチを開発ボードへ書き込む

サンプルスケッチをマイコンボードへ書き込みます。

エラーとなる方は、こちらが参考になるかもしれません。

ペアリングの際に表示される名前は、「ESP32testDAZE」としました。

f:id:opensourcetech:20200115221137p:plain

 

 

⑤ペアリングを行う

Windows PC・Mac OS PC・AndroidデバイスなどBluetoothに対応した端末からペアリングを行います。

先ほど設定した名前「ESP32testDAZE」とペアリングします。

 

Windows10の場合

f:id:opensourcetech:20200115221645p:plain

f:id:opensourcetech:20200115221651p:plain

f:id:opensourcetech:20200115221700p:plain

 

Android9の場合

f:id:opensourcetech:20200115222911p:plain

f:id:opensourcetech:20200115222913p:plain

f:id:opensourcetech:20200115222915p:plain





 

 

 

アフィリエイトのアクセストレード

 

 

 

 

 

 

www.slideshare.net

github.com

www.facebook.com

twitter.com

www.instagram.com

 

 

にほんブログ村 IT技術ブログ Linuxへ
Linux

にほんブログ村 IT技術ブログ オープンソースへ
オープンソース

 

 

Opensourcetech by Takahiro Kujirai