Download User Guide (for ScatterWeb)
Transcript
3.3 ScatterWeb.Data
\ScatterWeb 2.x\System\src\ScatterWeb.Data.h:
#ifndef ScatterWeb_Data
#define ScatterWeb_Data
#include "ScatterWeb.Time.h"
#define REDSTATE
(Data_redLed())
#define YELLOWSTATE
(Data_yellowLed())
#define GREENSTATE
(Data_greenLed())
#define SENSOR_MOVEMENT
(0x08)
#define SENSOR_VIBRATION
(0x10)
#define SENSOR_BUTTON
(0x80)
#define SENSOR_MICROPHONE
(0x01)
#define SENSOR_TEMPERATURE
(0x02)
#define SENSOR_RC5
(0x04)
#define SENSOR_VOLTAGE
(0x40)
#define SENSOR_LIGHT
(0x20)
typedef struct {
UINT16 id;
UINT8 sensor;
time_t timeStamp;
UINT16 value;
} sdata_t;
extern UINT8 Data_sensorFlags;
bool Data_init();
bool Data_batteryOn(UINT16 interval, UINT16 thresh);
bool Data_batteryOff();
bool Data_beeperOn();
bool Data_beeperOff();
bool Data_beeperToggle();
bool Data_buttonOn(UINT16 delay);
bool Data_buttonOff();
bool Data_greenOn();
bool Data_greenOff();
bool Data_greenToggle();
bool Data_redOn();
bool Data_redOff();
bool Data_redToggle();
ScatterWeb inside
21