Help us understand the problem. What is going on with this article?

Web Bluetooth APIでArduino 101とブラウザを直接つなぐ

More than 1 year has passed since last update.

Google Chromeのバージョン56からWeb Bluetooth APIが正式にリリースされたので、BLEでセンサーの値を飛ばすデバイスを作って試してみました。

試したこと

Arduino 101の内蔵IMUから加速度センサ3軸の値を読み取り、BLEで送信する。Chromeは、受信した各軸の値をグラフに描画する。

試した環境

  • macOS 10.12.3
  • Chrome 56.0.2924.87
  • Arduino (Genuino) 101
    • BLEと6軸センサーがあらかじめ載っているので、ハンダ付けの手間がなく楽だった。

手順

https://github.com/niccolli/WebBluetoothAPIwithCURIE

こちらのリポジトリにまとめています。

  1. Arduino 101にCurieIMU.inoを書き込みます
  2. Arduino 101を起動させておく
  3. index.htmlをChromeで開く。localhostのWebサーバか、file://として開く。
  4. Start Notificationsのボタンを押す

結果

Arduinoを動かすとグラフ描画に反映される様子

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away