forked from Open-Acidification/TankController
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPushingBox.h
More file actions
34 lines (28 loc) · 799 Bytes
/
PushingBox.h
File metadata and controls
34 lines (28 loc) · 799 Bytes
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
#pragma once
#include <Arduino.h>
#include "Ethernet_TC.h"
class PushingBox {
public:
// class methods
static PushingBox *instance(const char *pushingBoxID = nullptr);
// instance methods
PushingBox(const char *pushingBoxID);
EthernetClient *getClient() {
return &client;
}
const char *getServer() {
return server;
}
void loop();
private:
// class variables
static PushingBox *_instance;
// instance variables
EthernetClient client;
const char *DevID = nullptr; // DeviceID assigned by PushingBox and passed-in from TankController.ino
// wait a bit for first reading (https://github.com/Open-Acidification/TankController/issues/179)
uint32_t nextSendTime = 70000;
const char *server = "api.pushingbox.com";
// instance method
void sendData();
};