-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMapMe_At.h
More file actions
37 lines (31 loc) · 785 Bytes
/
MapMe_At.h
File metadata and controls
37 lines (31 loc) · 785 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
35
36
37
#ifndef MapMe_At_h
#define MapMe_At_h
#include "Arduino.h"
#include <IPAddress.h>
#include <Client.h>
#include <Ethernet.h>
#include <Server.h>
#include <Dns.h>
#include "ArduinoMiniJSON.h"
#define MAPME_AT_MAX_STRING 40
#define MAPME_AT_ERR_CONNECTION 1
#define MAPME_AT_ERR_RESULT 2
class MapMe_At {
public:
void setup(const char *_username, const char *_sharing_code);
void loop();
void requestLocation();
boolean isActive();
char* getLabel();
char* getPOIType();
boolean wasError();
private:
EthernetClient client;
int error;
char username[MAPME_AT_MAX_STRING];
char sharing_code[MAPME_AT_MAX_STRING];
char label[MAPME_AT_MAX_STRING];
char poi_type[MAPME_AT_MAX_STRING];
ArduinoMiniJSON jsonParser;
};
#endif