-
Notifications
You must be signed in to change notification settings - Fork 0
/
oBee.h
116 lines (88 loc) · 2.69 KB
/
oBee.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/* oBee.h */
#include "Drone.h"
#include "DroneSwitch.h"
#include "DroneTemperature.h"
#include "DroneDigital.h"
#include "DroneAnalog.h"
#include "DroneAmbientTemp.h"
#include "oBeeRGB.h"
#include "oBeeSound.h"
#include "Worker.h"
#include "LinkedList.h"
#ifndef _oBee_h
#define _oBee_h
const int PIN_Buzzer = D0;
const int PIN_RGB = D1;
const int PIN_D11 = D2;
const int PIN_D12 = D3;
const int PIN_D21 = D5;
const int PIN_D22 = D4;
const int PIN_D31 = D7;
const int PIN_D32 = D6;
const int PIN_A11 = A0;
const int PIN_A12 = A1;
const int PIN_A21 = A2;
const int PIN_A22 = A3;
const int AUX_0 = 0;
const int AUX_1 = 1;
const int AUX_2 = 2;
const int N_PIXELS = 3;
class oBee
{
public:
oBee();
oBeeRGB oRGB;
oBeeSound oSound;
void Update();
//void NotificationComplete();
void SetUpDrone(String str);
void SetUpDroneSwitch(sensor oSensor);
void SetUpDroneTemperature(sensor oSensor);
void SetUpDroneDigital(sensor oSensor);
void SetUpDroneAnalog(sensor oSensor);
void SetUpDroneAmbientTemp(sensor oSensor);
void ClearLists();
LinkedList<DroneSwitch*> droneSwitchList = LinkedList<DroneSwitch*>();
LinkedList<DroneTemperature*> droneTemperatureList = LinkedList<DroneTemperature*>();
LinkedList<DroneDigital*> droneDigitalList = LinkedList<DroneDigital*>();
LinkedList<DroneAnalog*> droneAnalogList = LinkedList<DroneAnalog*>();
LinkedList<DroneAmbientTemp*> droneAmbientTempList = LinkedList<DroneAmbientTemp*>();
//DronePresence;
//DroneLight;
//DroneButton; ???
//DroneLine1;
//DroneLine2;
//DroneLine3;
//DroneDistance;
//DroneAmbientTemperature;
//DroneAmbientHumidity
//DroneTemperature1;
//DroneTemperature2;
//DroneSoilMoisture1;
//DroneSoilMoisture2;
//DroneRain;
//DroneWaterLevel1;
//DroneWaterLevel2;
//DroneSound;
//DroneLightLevel;
//DroneAmp;
//DroneVolt;
//DroneGas;
int GetPinValue(String strPIN);
void SetUpWorker(String str);
LinkedList<Worker*> workerList = LinkedList<Worker*>();
void HandleWorker(sensor oSensor, sensor_event oEvent);
void HandleNotification(sensor oSensor, sensor_event oEvent);
void RGBNotification(int id);
void BzzrNotification(int id);
void NotificationComplete();
uint32_t color1, color2, lastColor;
long msLast = 0;
private:
unsigned int _channelNumber;
String writeAPIKey;
String buzzerTallBackID;
String rgbTallBackID;
OneWire oneWire;
};
#endif