9
11

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 5 years have passed since last update.

[SensorTag] Texas Instruments の CC2650 SensorTag を試す

Last updated at Posted at 2015-11-28

はじめに

CC2650とは

簡単に言うと、センサーの塊で10種類の情報を取得できます :musical_note: :blush:

  • デジタル・マイク
  • 磁気センサ
  • 湿度
  • 圧力
  • 加速度計
  • ジャイロスコープ
  • 磁力計
  • 物体の温度
  • 周囲温度

経緯

センサーに囲まれたい :flushed: 楽しそう :yum:

購入

マクニカオンラインストアで購入しました :notes:

ファームウェアのアップデート

Texas Instruments のiOSアプリより
SensorTag のファームウェアを最新化しました :stuck_out_tongue_closed_eyes:

iPhoneで動作確認

前述のアプリを使うと、簡単に SensorTag から情報が取得できます :sunglasses:

screen568x568.jpeg

Macで動作確認

javascript で動かしたかったので、
npm のパッケージ sensortag を利用してみました。

初期化

$ npm init -y

依存パッケージの追加

$ npm install async sensortag --save

テストプログラムの実行

$ node ./node_modules/sensortag/test.js

とりあえず動いた

discovered: {"id":"XXXXXXXXXXXXXXXXXXXXXXXXXXX","type":"cc2650"}
connectAndSetUp
readDeviceName
	device name = undefined
readSystemId
	system id = XX:XX:XX:XX:XX:XX:XX:XX
readSerialNumber
	serial number = N.A.
readFirmwareRevision
	firmware revision = 1.20 (Jul 28 2015)
readHardwareRevision
	hardware revision = PCB 1.2/1.3
readSoftwareRevision
	software revision = PCB 1.2/1.3
readManufacturerName
	manufacturer name = Texas Instruments
enableIrTemperature
readIrTemperature
	object temperature = 7.7 °C
	ambient temperature = 14.9 °C
disableIrTemperature
enableAccelerometer
readAccelerometer
	x = 0 G
	y = 0 G
	z = 0.2 G
disableAccelerometer
enableHumidity
readHumidity
	temperature = 14.9 °C
	humidity = 73.6 %
disableHumidity
enableMagnetometer
readMagnetometer
	x = 35.4 μT
	y = 1 μT
	z = 100.5 μT
disableMagnetometer
enableBarometricPressure
readBarometricPressure
	pressure = 1019.8 mBar
disableBarometricPressure
enableGyroscope
readGyroscope
	x = -1.4 °/s
	y = -0.1 °/s
	z = 2.8 °/s
disableGyroscope
readIoData
	data = 127
writeIoData
readIoConfig
	config = 0
writeIoConfig
enableLuxometer
readLuxometer
	lux = 335.5
disableLuxometer
readSimpleRead - waiting for button press ...
left: false
right: true
reed relay: false
left: false
right: false
reed relay: false
disconnect
disconnected!

所感

  • 片手で持ち運べるほど小さい :laughing:
  • 簡単に情報を取得できる :heart_eyes:
9
11
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
9
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?