LoginSignup
2
1

More than 3 years have passed since last update.

AE-TYBLE16でBLE通信で情報取得できる加速度センサーを作る

Posted at

利用する部材

種類 製品名 URL
Arduino AE-TYBLE16 http://akizukidenshi.com/catalog/g/gK-12339/
加速度センサ(電圧型) KXSC7-2050 http://akizukidenshi.com/catalog/g/gK-07243/

AE-TYBLE16をArduinoで利用する方法については小型 Bluetooth LE モジュール AE-TYBLE16とボタン電池でビーコンを作るを参照。

作り方

KXSC7-2050はXYZ方向の加速度をセンシングでき、センシング値は電圧で出力されます。
配線は下記。
sample.png

DeviceNameは”AccelerationSensor”です。
Androidの場合はnRF Connectで値を確認することができます。

AE-TYBLE16では1つのCharacteristicを利用するため、XYZを(z*1024+y)*1024)+x)な値に計算して入れています。

ソースコードは下記にアップしました。
https://github.com/MypaceEngine/ae-tyble16-accelerator.git

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