-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathArduinotechGSMShield.h
73 lines (59 loc) · 1.43 KB
/
ArduinotechGSMShield.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
//knihovna pro obsluhu shieldu Arduinotech GSM
//vytvořeno 15.11.2015
//Update:
//Autor: Ing. Petr Foltýn
//www.arduinotech.cz
#ifndef ArduinotechGSMShield
#define ArduinotechGSMShield
//Includes
#include "Arduino.h"
#include "SoftwareSerial.h"
//Definitions - according GSM shield HW setup
#define GSMReset 4
#define LED 7
#define RELE1 8
#define RELE2 9
#define IN1 5
#define IN2 6
#define RX 2
#define TX 3
class AGS
{
public:
String number;
String actTime;
String SMScontent;
AGS(uint8_t speed);
static SoftwareSerial SIM800;
void SIM800Init();
void begin();
void sendSMS(String number, String sms);
//uint8_t checkSMS();
//uint8_t checkCall();
String getNumber();
String getSMSContent();
String getQuality();
String getProviderName();
void checkInput();
String timeStamp();
String actualTime();
void restartSIMHW();
void callEnd();
void makeCall(String callNumber);
uint8_t checkCallAndSMS();
bool isConnected();
bool GPRSInit(String APN);
String sendDataGPRS(String dataToSend);
private:
uint8_t _debug;
bool callInProgress;
String providerName;
String GSMsignal;
bool rele1Status, rele2Status;
bool IN1Status, IN2Status;
uint8_t tempIndex;
void clrSIMbuffer();
String sendATcommandResponse(char* ATcommand, char* expected_answer, unsigned int timeout, unsigned int buf);
int8_t sendATcommand(char* ATcommand, char* expected_answer, unsigned int timeout);
};
#endif