obniz
Version:
obniz sdk for javascript
48 lines (47 loc) • 1.48 kB
TypeScript
/**
* @packageDocumentation
* @module Parts.STM550B
*/
import { ObnizBleBeaconStruct, ObnizPartsBle } from '../../../obniz/ObnizPartsBleAbstract';
export interface STM550B_Options {
}
/**
* advertisement data from STM550B
*
* STM550Bからのadvertisementデータ
*/
export interface STM550B_Data {
/** temperature 温度 (Unit 単位: 0.01 degC)*/
temperature?: number;
/** battery 電源電圧 (Unit 単位: 0.5 mV) */
voltage?: number;
/** energy_level 電源レベル (Unit 単位: 1 %) */
energy_level?: number;
/**
* illumination_solar_cell ソーラーセルの明るさ (Unit 単位: 1 lux )
*/
illumination_solar_cell?: number;
/**
* illumination_sensor センサの明るさ (Unit 単位: 1 lux )
*/
illumination_sensor?: number;
/**
* humidity 相対湿度 (Unit 単位: 0.5 % )
*/
humidity?: number;
/** 加速度 x,y,z (単位: g, -5.12g 〜 5.12g) */
acceleration_vector?: {
x: number;
y: number;
z: number;
};
/** magnet nearby or not 近くに磁石があるかどうか */
magnet_contact?: boolean;
}
export default class STM550B extends ObnizPartsBle<STM550B_Data> {
protected readonly staticClass: typeof STM550B;
static readonly PartsName = "STM550B";
static readonly AvailableBleMode = "Beacon";
static readonly CompanyID: number[];
static readonly BeaconDataStruct: ObnizBleBeaconStruct<STM550B_Data>;
}